I'm using this in my conf:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$      /index.php?page=$1 [QSA]

But files such as /theme/styles.css still get redirected to index.php

Does anyone know why this doesn't work?

link|improve this question
Is this in an .htaccess, or in the apache conf? If in an .htaccess, have you correctly set the RewriteBase? – Steven Monday Nov 14 '10 at 15:52
feedback

1 Answer

Just a note, /theme/styles.css is a REQUEST_URI not a REQUEST_FILENAME; the _FILENAME is a full path on disk. Try adding debugging to see what is being evaluated:

RewriteLog /tmp/rewrite.log
RewriteLogLevel 3

Find the relevant section of your request in the log and it should show you what's wrong, but if not then paste it for us to see.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.