tags:

views:

23

answers:

2
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^((app_.*?)|models|plugins|jig) - [F,L]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d

    RewriteRule ^(.*)$ index.php/$1 [QSA,L]
</IfModule>

Above is my .htaccess file... and index.php is logging each request. When I check my logs, I get the first expected rewrite logged, and then I get rewrite logs for every JS/CSS inclusion in the HTML output from the first rewrite.

The CSS/JS paths in the markup are valid direct paths to files that exist, so it seems that it should never get to my RewriteRule above. Anyone experience a similar problem?

+1  A: 

could be as simple as presence/absence of initial slash in the file paths, but I think you need to show us more to be able to really help.

Devin Ceartas
A: 

Try it the other way:

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
Gumbo