Hello,
I have activated Pretty URLs and generated a new .htaccess-file but unfortunately it doesn't work with every page.
I'm working with xampp and the .htaccess file is located in the root. My page is in a subfolder.
I have two php files where I have inserted couchcms tags: index.php and content.php.
Both templates are clonable and both files are located in the same subfolder.
Index.php is working with Pretty URLs but content.php isn't working!
I tried it with different php-files as well but it only works with the index.php.
So when I call the page "http://localhost/mysubfolder/content.php?p=3" it get's redirected to "http://localhost/mysubfolder/content/about-us.html" but the page shows:
"Page not found".
This is how my .htaccess looks like:
I have activated Pretty URLs and generated a new .htaccess-file but unfortunately it doesn't work with every page.
I'm working with xampp and the .htaccess file is located in the root. My page is in a subfolder.
I have two php files where I have inserted couchcms tags: index.php and content.php.
Both templates are clonable and both files are located in the same subfolder.
Index.php is working with Pretty URLs but content.php isn't working!
I tried it with different php-files as well but it only works with the index.php.
So when I call the page "http://localhost/mysubfolder/content.php?p=3" it get's redirected to "http://localhost/mysubfolder/content/about-us.html" but the page shows:
"Page not found".
This is how my .htaccess looks like:
- Code: Select all
Options +Indexes +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 /mysubfolder
#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 /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]
#content.php
RewriteRule ^content$ "$0/" [R=301,L,QSA]
RewriteRule ^content/$ content.php [L,QSA]
RewriteRule ^content/.*?([^\.\/]*)\.html$ content.php?pname=$1 [L,QSA]
RewriteRule ^content/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ content.php?d=$1$2$3 [L,QSA]
RewriteRule ^content/[^\.]*?([^/\.]*)/$ content.php?fname=$1 [L,QSA]
RewriteRule ^content/[^\.]*?([^/\.]*)$ "$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>