My .htaccess file is in the root directory of my website, and I narrowed down a problem to the single line of code RewriteEngine on
. How do I know it's this piece of code? Because I deleted the entire .htaccess
file except for RewriteEngine on
as a test... and my CGI application still broke.
If anyone has any idea why the RewriteEngine on
line decides to break the CGI application all on its own I'd love to hear it!
PS - Just in case you're interested, the piece of code that I want to get working is to help consolidate all domains into a single domain (the line breaks are there simply to make it easier to read):
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html
RewriteRule (.*) http://www.example.com/ [R=301,L]