.htaccess Redirect Problem


I have a weird problem.

Before I moved my site here, I had a few simple lines in my index.php files and my .htaccess file for a homemade “template engine” to make editing and uploading easier, and to remove the gobbledygook from the URL so it would be easier to remember if I had to type in a page link into the address bar. The index.php is basically like this: http://www.dreamincode.net/forums/topic/242835-creating-a-simple-dynamic-website-with-php/

The .htaccess lines were:

RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteCond $1 !^(index\.php) RewriteRule ^(.*)/?$ index.php?page=$1 [QSA,NC,L]

Worked like a charm. I moved to DreamHost, and now it only works on the subdomains. All the subdomains are displaying their pages correctly, but everything on the main www site either won’t display, or only displays the raw data file if I use the “pretty URL”.
In example, here is the main site links page: http://www.raven-wing.net/links
Versus a subdomain’s links page: http://jad.raven-wing.net/links
Yet this “ugly” link displays correctly: http://www.raven-wing.net/index.php?page=links

Normally I can beat my head against the wall long enough to figure these problems out on my own, but with this one I haven’t the foggiest idea what’s wrong. Any clues?


Maybe check the case of your include files? I just tried by chance http://www.raven-wing.net/Links and noticed it seems to work correctly

Maybe just adding the [NC] condition to this will solve it?

RewriteCond $1 !^(index.php) [NC]



Really? It sent me to the Error 404 page. Even after adding [NC] to that line. I did double check all my files to make sure they were lowercase, so that one can be scratched off the list.


I do believe I have a solution. Put everything else under main.raven-wing.net and just leave the www as a welcome screen. Seems to be working so far! =P

Just so odd that .htaccess redirect worked everywhere but on the www site. I seem to find all the weird coding issues when I poke at stuff.