I have been using simple mod_rewrite rules for my CMS for years and am now making a new version, I am seeing the rewriteCond not making sense- I have the standard "if is not a file" but I still see the rewriterules being evaluated even though they're not supposed to. My rewrite code:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)$ index.php?page=$1
RewriteRule ^([^/]+)/([^/]+)$ index.php?page=$1&var=$2
I load /page/var and it works fine as index.php?page=page&var=var, but I try to load /css/file.css and it loads index.php?page=css&var=file.css even though /css/file.css is a file, so the whole rewrite section shouldn't even be evaluated.
I've never seen htaccess apparently defy its own logic, can someone help me figure this out? Has anyone ever run across anything like this?