Hi
I am having a nightmare with seo urls, couchcms and htaccess file
it works apart from every time I go to a page called gallery and go to another page, it seems to think that the other pages are in a folder called gallery and the link is all wrong and keeps saying page not found
can someone please help me as this is frustrating me now
My htaccess that is located in the root of the website not the couchcms folder is below
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 /
#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]
## don't touch /cms URIs
RewriteRule ^cms/ - [L,NC]
RewriteRule ^(photobooths-for-hire-essex)$ "$1/" [R=301,L,QSA]
RewriteRule ^(photobooths-for-hire-essex)/$ $1.php [L,QSA]
RewriteRule ^(contact-us)$ "$1/" [R=301,L,QSA]
RewriteRule ^(contact-us)/$ $1.php [L,QSA]
RewriteRule ^(sitemap)$ "$1/" [R=301,L,QSA]
RewriteRule ^(sitemap)/$ $1.php [L,QSA]
#DO NOT EDIT BELOW THIS
RewriteRule ^index.php$ "" [R=301,L,QSA]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule . - [L]
#gallery.php
RewriteRule ^gallery$ "$0/" [R=301,L,QSA]
RewriteRule ^gallery/$ gallery.php [L,QSA]
RewriteRule ^gallery/.*?([^\.\/]*)\.html$ gallery.php?pname=$1 [L,QSA]
RewriteRule ^gallery/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ gallery.php?d=$1$2$3 [L,QSA]
RewriteRule ^gallery/[^\.]*?([^/\.]*)/$ gallery.php?fname=$1 [L,QSA]
RewriteRule ^gallery/[^\.]*?([^/\.]*)$ "$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>
UPDATE: Sorry noticed it's not when am just in the gallery page, it's on all pages so thinking something can't be right with my htaccess file or could it be the config file, I can attach the config.php file if needed?
Thank you in advance
Ian
I am having a nightmare with seo urls, couchcms and htaccess file
it works apart from every time I go to a page called gallery and go to another page, it seems to think that the other pages are in a folder called gallery and the link is all wrong and keeps saying page not found
can someone please help me as this is frustrating me now
My htaccess that is located in the root of the website not the couchcms folder is below
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 /
#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]
## don't touch /cms URIs
RewriteRule ^cms/ - [L,NC]
RewriteRule ^(photobooths-for-hire-essex)$ "$1/" [R=301,L,QSA]
RewriteRule ^(photobooths-for-hire-essex)/$ $1.php [L,QSA]
RewriteRule ^(contact-us)$ "$1/" [R=301,L,QSA]
RewriteRule ^(contact-us)/$ $1.php [L,QSA]
RewriteRule ^(sitemap)$ "$1/" [R=301,L,QSA]
RewriteRule ^(sitemap)/$ $1.php [L,QSA]
#DO NOT EDIT BELOW THIS
RewriteRule ^index.php$ "" [R=301,L,QSA]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule . - [L]
#gallery.php
RewriteRule ^gallery$ "$0/" [R=301,L,QSA]
RewriteRule ^gallery/$ gallery.php [L,QSA]
RewriteRule ^gallery/.*?([^\.\/]*)\.html$ gallery.php?pname=$1 [L,QSA]
RewriteRule ^gallery/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ gallery.php?d=$1$2$3 [L,QSA]
RewriteRule ^gallery/[^\.]*?([^/\.]*)/$ gallery.php?fname=$1 [L,QSA]
RewriteRule ^gallery/[^\.]*?([^/\.]*)$ "$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>
UPDATE: Sorry noticed it's not when am just in the gallery page, it's on all pages so thinking something can't be right with my htaccess file or could it be the config file, I can attach the config.php file if needed?
Thank you in advance
Ian