Just trying to do pretty urls and following the guide on how to do it and I have enabled it in the config file, generated the htaccess file and uploaded to the root but I am getting internal server error on both back and front end so have tried the test_rewrite test and it says mod rewrite is on so know that's not the issue. I removed the very first line of the generated htaccess file as that worked for someone else using couchcms who had the same issue but still no joy, below is the generated htaccess file. Is there anything I need to change from the htaccess file?
The web server log says /home/techiemonkeyco/public_html/.htaccess: </IfModule> without matching <IfModule> section
The web server log says /home/techiemonkeyco/public_html/.htaccess: </IfModule> without matching <IfModule> section
- Code: Select all
<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]
#it-support.php
RewriteRule ^it-support$ "$0/" [R=301,L,QSA]
RewriteRule ^it-support/$ it-support.php [L,QSA]
RewriteRule ^it-support/.*?([^\.\/]*)\.html$ it-support.php?pname=$1 [L,QSA]
RewriteRule ^it-support/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ it-support.php?d=$1$2$3 [L,QSA]
RewriteRule ^it-support/[^\.]*?([^/\.]*)/$ it-support.php?fname=$1 [L,QSA]
RewriteRule ^it-support/[^\.]*?([^/\.]*)$ "$0/" [R=301,L,QSA]
#it-disposal.php
RewriteRule ^it-disposal$ "$0/" [R=301,L,QSA]
RewriteRule ^it-disposal/$ it-disposal.php [L,QSA]
RewriteRule ^it-disposal/.*?([^\.\/]*)\.html$ it-disposal.php?pname=$1 [L,QSA]
RewriteRule ^it-disposal/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ it-disposal.php?d=$1$2$3 [L,QSA]
RewriteRule ^it-disposal/[^\.]*?([^/\.]*)/$ it-disposal.php?fname=$1 [L,QSA]
RewriteRule ^it-disposal/[^\.]*?([^/\.]*)$ "$0/" [R=301,L,QSA]
#contact.php
RewriteRule ^contact$ "$0/" [R=301,L,QSA]
RewriteRule ^contact/$ contact.php [L,QSA]
RewriteRule ^contact/.*?([^\.\/]*)\.html$ contact.php?pname=$1 [L,QSA]
RewriteRule ^contact/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ contact.php?d=$1$2$3 [L,QSA]
RewriteRule ^contact/[^\.]*?([^/\.]*)/$ contact.php?fname=$1 [L,QSA]
RewriteRule ^contact/[^\.]*?([^/\.]*)$ "$0/" [R=301,L,QSA]
#book-it-support.php
RewriteRule ^book-it-support$ "$0/" [R=301,L,QSA]
RewriteRule ^book-it-support/$ book-it-support.php [L,QSA]
RewriteRule ^book-it-support/.*?([^\.\/]*)\.html$ book-it-support.php?pname=$1 [L,QSA]
RewriteRule ^book-it-support/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ book-it-support.php?d=$1$2$3 [L,QSA]
RewriteRule ^book-it-support/[^\.]*?([^/\.]*)/$ book-it-support.php?fname=$1 [L,QSA]
RewriteRule ^book-it-support/[^\.]*?([^/\.]*)$ "$0/" [R=301,L,QSA]
#about-us.php
RewriteRule ^about-us$ "$0/" [R=301,L,QSA]
RewriteRule ^about-us/$ about-us.php [L,QSA]
RewriteRule ^about-us/.*?([^\.\/]*)\.html$ about-us.php?pname=$1 [L,QSA]
RewriteRule ^about-us/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ about-us.php?d=$1$2$3 [L,QSA]
RewriteRule ^about-us/[^\.]*?([^/\.]*)/$ about-us.php?fname=$1 [L,QSA]
RewriteRule ^about-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>