I’ve just migrated to DreamHost, and I’m having a problem with my mod_rewrite config on one of my sites. When I moved my site over, I moved my exact config over, and it’s not behaving the way it did at my old host.
The text of my .htaccess:
RewriteRule ^/(content/.*) /$1 [L]
RewriteRule ^/(includes/.*) /$1 [L]
RewriteRule ^/(images/.*) /$1 [L]
RewriteRule ^/(favicon.ico) /$1 [L]
RewriteRule ^/(robots.txt) /$1 [L]
RewriteRule ^/(.*) /index.php?$1 [L]
The goal here is pretty simple: if the requested URL is in the /content/, /images/, or /includes/ directories, or if it is a request for /favicon.ico or /robots.txt, let it through normally. Otherwise, redirect it to /index.php with the URL as a parameter to the php script.
Again, this worked fine (for well over a year) at my old host, and yet here on DreamHost, that last rule appears to be ignored entirely. Requests, for example, for “/about.html” result in a 404, implying that mod_rewrite didn’t even try to do anything with it.