I am setting up a site on a shared hosting plan so I am stuck using Apache and a .htaccess file. I have 2 RewriteRules defined. Both rules work perfectly on a local machine running Apache.
The first rule is to rewrite requests for /css/FILE.css to /www/css/FILE.css The second rewrites everything else to /www/index.php
The first rule regarding CSS/JS files is the one causing 500 errors but I can't figure out why. I have tried every different incarnation of these rules and always get a 500.
RewriteEngine on
RewriteBase /
RewriteRule ^(.*)\.(css|js) www/$1.$2 [L]
RewriteRule ^(.*)$ www/index.php [L]
RewriteRule (css|js)$ www%{REQUEST_URI} [L]and still get 500. Also, if i rewrite to somewhere else other than /www it will work. – user897929 Aug 17 '11 at 5:50