Hi
I am having a major issue on a website I built and integrated couchcms into it and trying to make the urls pretty, I have done all the steps required, generated the htaccess file but am getting a warning saying the page isnt redirecting properly in Firefox and on my phone in safari it says the page cant open because of too many redirects occured, I have added below the htaccess lines
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]
#DO NOT EDIT BELOW THIS
RewriteRule ^index.php$ "" [R=301,L,QSA]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule . - [L]
#sitemap.php
RewriteRule ^sitemap$ "$0/" [R=301,L,QSA]
RewriteRule ^sitemap/$ sitemap.php [L,QSA]
RewriteRule ^sitemap/.*?([^\.\/]*)\.html$ sitemap.php?pname=$1 [L,QSA]
RewriteRule ^sitemap/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ sitemap.php?d=$1$2$3 [L,QSA]
RewriteRule ^sitemap/[^\.]*?([^/\.]*)/$ sitemap.php?fname=$1 [L,QSA]
RewriteRule ^sitemap/[^\.]*?([^/\.]*)$ "$0/" [R=301,L,QSA]
#photobooths-for-hire-essex.php
RewriteRule ^photobooths-for-hire-essex$ "$0/" [R=301,L,QSA]
RewriteRule ^photobooths-for-hire-essex/$ photobooths-for-hire-essex.php [L,QSA]
RewriteRule ^photobooths-for-hire-essex/.*?([^\.\/]*)\.html$ photobooths-for-hire-essex.php?pname=$1 [L,QSA]
RewriteRule ^photobooths-for-hire-essex/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ photobooths-for-hire-essex.php?d=$1$2$3 [L,QSA]
RewriteRule ^photobooths-for-hire-essex/[^\.]*?([^/\.]*)/$ photobooths-for-hire-essex.php?fname=$1 [L,QSA]
RewriteRule ^photobooths-for-hire-essex/[^\.]*?([^/\.]*)$ "$0/" [R=301,L,QSA]
#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]
#contact-us.php
RewriteRule ^contact-us$ "$0/" [R=301,L,QSA]
RewriteRule ^contact-us/$ contact-us.php [L,QSA]
RewriteRule ^contact-us/.*?([^\.\/]*)\.html$ contact-us.php?pname=$1 [L,QSA]
RewriteRule ^contact-us/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ contact-us.php?d=$1$2$3 [L,QSA]
RewriteRule ^contact-us/[^\.]*?([^/\.]*)/$ contact-us.php?fname=$1 [L,QSA]
RewriteRule ^contact-us/[^\.]*?([^/\.]*)$ "$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>
Hope someone can help me please
Thank you in advance
Ian
I am having a major issue on a website I built and integrated couchcms into it and trying to make the urls pretty, I have done all the steps required, generated the htaccess file but am getting a warning saying the page isnt redirecting properly in Firefox and on my phone in safari it says the page cant open because of too many redirects occured, I have added below the htaccess lines
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]
#DO NOT EDIT BELOW THIS
RewriteRule ^index.php$ "" [R=301,L,QSA]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule . - [L]
#sitemap.php
RewriteRule ^sitemap$ "$0/" [R=301,L,QSA]
RewriteRule ^sitemap/$ sitemap.php [L,QSA]
RewriteRule ^sitemap/.*?([^\.\/]*)\.html$ sitemap.php?pname=$1 [L,QSA]
RewriteRule ^sitemap/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ sitemap.php?d=$1$2$3 [L,QSA]
RewriteRule ^sitemap/[^\.]*?([^/\.]*)/$ sitemap.php?fname=$1 [L,QSA]
RewriteRule ^sitemap/[^\.]*?([^/\.]*)$ "$0/" [R=301,L,QSA]
#photobooths-for-hire-essex.php
RewriteRule ^photobooths-for-hire-essex$ "$0/" [R=301,L,QSA]
RewriteRule ^photobooths-for-hire-essex/$ photobooths-for-hire-essex.php [L,QSA]
RewriteRule ^photobooths-for-hire-essex/.*?([^\.\/]*)\.html$ photobooths-for-hire-essex.php?pname=$1 [L,QSA]
RewriteRule ^photobooths-for-hire-essex/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ photobooths-for-hire-essex.php?d=$1$2$3 [L,QSA]
RewriteRule ^photobooths-for-hire-essex/[^\.]*?([^/\.]*)/$ photobooths-for-hire-essex.php?fname=$1 [L,QSA]
RewriteRule ^photobooths-for-hire-essex/[^\.]*?([^/\.]*)$ "$0/" [R=301,L,QSA]
#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]
#contact-us.php
RewriteRule ^contact-us$ "$0/" [R=301,L,QSA]
RewriteRule ^contact-us/$ contact-us.php [L,QSA]
RewriteRule ^contact-us/.*?([^\.\/]*)\.html$ contact-us.php?pname=$1 [L,QSA]
RewriteRule ^contact-us/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ contact-us.php?d=$1$2$3 [L,QSA]
RewriteRule ^contact-us/[^\.]*?([^/\.]*)/$ contact-us.php?fname=$1 [L,QSA]
RewriteRule ^contact-us/[^\.]*?([^/\.]*)$ "$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>
Hope someone can help me please
Thank you in advance
Ian