I want my website stored in a subfolder on the webserver. I have enabled the pretty urls and generated a '.htaccess' file with the 'gen_htaccess.php' file from the couch folder. I've stored the '.htaccess' file in de root folder of the webserver and looks like this:
But the file does not link to the subfolder. Do I maybe missing something?
- Code: Select all
Options +FollowSymlinks -MultiViews
<IfModule mod_rewrite.c>
RewriteEngine On
#If your website is installed in a subfolder, change the line below to reflect the path to the subfolder.
#e.g. for http://www.example.com/subdomain1/subdomain2/ make it RewriteBase /subdomain1/subdomain2
RewriteBase /website
#If you wish to use a custom 404 page, place a file named 404.php in your website's root and uncomment the line below.
#If your website is installed in a subfolder, change the line below to reflect the path to the subfolder.
#e.g. for http://www.example.com/subdomain1/subdomain2/ make it ErrorDocument 404 /subdomain1/subdomain2/404.php
ErrorDocument 404 /website/404.php
#If your site begins with 'www', uncomment the following two lines
#RewriteCond %{HTTP_HOST} !^www\.
#RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
#DO NOT EDIT BELOW THIS
RewriteRule ^index.php$ "" [R=301,L,QSA]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule . - [L]
#video.php
RewriteRule ^video$ "$0/" [R=301,L,QSA]
RewriteRule ^video/$ video.php [L,QSA]
RewriteRule ^video/.*?([^\.\/]*)\.html$ video.php?pname=$1 [L,QSA]
RewriteRule ^video/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ video.php?d=$1$2$3 [L,QSA]
RewriteRule ^video/[^\.]*?([^/\.]*)/$ video.php?fname=$1 [L,QSA]
RewriteRule ^video/[^\.]*?([^/\.]*)$ "$0/" [R=301,L,QSA]
#stats.php
RewriteRule ^stats$ "$0/" [R=301,L,QSA]
RewriteRule ^stats/$ stats.php [L,QSA]
RewriteRule ^stats/.*?([^\.\/]*)\.html$ stats.php?pname=$1 [L,QSA]
RewriteRule ^stats/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ stats.php?d=$1$2$3 [L,QSA]
RewriteRule ^stats/[^\.]*?([^/\.]*)/$ stats.php?fname=$1 [L,QSA]
RewriteRule ^stats/[^\.]*?([^/\.]*)$ "$0/" [R=301,L,QSA]
#sliders-bands.php
RewriteRule ^sliders-bands$ "$0/" [R=301,L,QSA]
RewriteRule ^sliders-bands/$ sliders-bands.php [L,QSA]
RewriteRule ^sliders-bands/.*?([^\.\/]*)\.html$ sliders-bands.php?pname=$1 [L,QSA]
RewriteRule ^sliders-bands/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ sliders-bands.php?d=$1$2$3 [L,QSA]
RewriteRule ^sliders-bands/[^\.]*?([^/\.]*)/$ sliders-bands.php?fname=$1 [L,QSA]
RewriteRule ^sliders-bands/[^\.]*?([^/\.]*)$ "$0/" [R=301,L,QSA]
#nieuws.php
RewriteRule ^nieuws$ "$0/" [R=301,L,QSA]
RewriteRule ^nieuws/$ nieuws.php [L,QSA]
RewriteRule ^nieuws/.*?([^\.\/]*)\.html$ nieuws.php?pname=$1 [L,QSA]
RewriteRule ^nieuws/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ nieuws.php?d=$1$2$3 [L,QSA]
RewriteRule ^nieuws/[^\.]*?([^/\.]*)/$ nieuws.php?fname=$1 [L,QSA]
RewriteRule ^nieuws/[^\.]*?([^/\.]*)$ "$0/" [R=301,L,QSA]
#historie.php
RewriteRule ^historie$ "$0/" [R=301,L,QSA]
RewriteRule ^historie/$ historie.php [L,QSA]
RewriteRule ^historie/.*?([^\.\/]*)\.html$ historie.php?pname=$1 [L,QSA]
RewriteRule ^historie/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ historie.php?d=$1$2$3 [L,QSA]
RewriteRule ^historie/[^\.]*?([^/\.]*)/$ historie.php?fname=$1 [L,QSA]
RewriteRule ^historie/[^\.]*?([^/\.]*)$ "$0/" [R=301,L,QSA]
#globals.php
RewriteRule ^globals$ "$0/" [R=301,L,QSA]
RewriteRule ^globals/$ globals.php [L,QSA]
RewriteRule ^globals/.*?([^\.\/]*)\.html$ globals.php?pname=$1 [L,QSA]
RewriteRule ^globals/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ globals.php?d=$1$2$3 [L,QSA]
RewriteRule ^globals/[^\.]*?([^/\.]*)/$ globals.php?fname=$1 [L,QSA]
RewriteRule ^globals/[^\.]*?([^/\.]*)$ "$0/" [R=301,L,QSA]
#fotoalbums.php
RewriteRule ^fotoalbums$ "$0/" [R=301,L,QSA]
RewriteRule ^fotoalbums/$ fotoalbums.php [L,QSA]
RewriteRule ^fotoalbums/.*?([^\.\/]*)\.html$ fotoalbums.php?pname=$1 [L,QSA]
RewriteRule ^fotoalbums/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ fotoalbums.php?d=$1$2$3 [L,QSA]
RewriteRule ^fotoalbums/[^\.]*?([^/\.]*)/$ fotoalbums.php?fname=$1 [L,QSA]
RewriteRule ^fotoalbums/[^\.]*?([^/\.]*)$ "$0/" [R=301,L,QSA]
#festivals.php
RewriteRule ^festivals$ "$0/" [R=301,L,QSA]
RewriteRule ^festivals/$ festivals.php [L,QSA]
RewriteRule ^festivals/.*?([^\.\/]*)\.html$ festivals.php?pname=$1 [L,QSA]
RewriteRule ^festivals/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ festivals.php?d=$1$2$3 [L,QSA]
RewriteRule ^festivals/[^\.]*?([^/\.]*)/$ festivals.php?fname=$1 [L,QSA]
RewriteRule ^festivals/[^\.]*?([^/\.]*)$ "$0/" [R=301,L,QSA]
#503.php
RewriteRule ^503$ "$0/" [R=301,L,QSA]
RewriteRule ^503/$ 503.php [L,QSA]
RewriteRule ^503/.*?([^\.\/]*)\.html$ 503.php?pname=$1 [L,QSA]
RewriteRule ^503/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ 503.php?d=$1$2$3 [L,QSA]
RewriteRule ^503/[^\.]*?([^/\.]*)/$ 503.php?fname=$1 [L,QSA]
RewriteRule ^503/[^\.]*?([^/\.]*)$ "$0/" [R=301,L,QSA]
#404.php
RewriteRule ^404$ "$0/" [R=301,L,QSA]
RewriteRule ^404/$ 404.php [L,QSA]
RewriteRule ^404/.*?([^\.\/]*)\.html$ 404.php?pname=$1 [L,QSA]
RewriteRule ^404/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ 404.php?d=$1$2$3 [L,QSA]
RewriteRule ^404/[^\.]*?([^/\.]*)/$ 404.php?fname=$1 [L,QSA]
RewriteRule ^404/[^\.]*?([^/\.]*)$ "$0/" [R=301,L,QSA]
#index.php
RewriteRule ^.*?([^\.\/]*)\.html$ ?pname=$1 [L,QSA]
RewriteRule ^([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ ?d=$1$2$3 [L,QSA]
RewriteRule ^[^\.]*?([^/\.]*)/$ ?fname=$1 [L,QSA]
RewriteRule ^\w[^\.]*?([^/\.]*)$ "$0/" [R=301,L,QSA]
</IfModule>
But the file does not link to the subfolder. Do I maybe missing something?