hi,
i'm working on a system which implements clean urls (virtual directories which are resolved to a system of passing the path to a single script for the whole site). here's the code i have:
RewriteCond %{REQUEST_FILENAME} !-s
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?p=$1 [L,QSA,S]
it works quite well. in fact too well. i'm now hitting a problem where if anywhere in my code, i request an image which doesn't exist, it too is caught by the rule. i've tried adding this condition:
RewriteCond %{REQUEST_FILENAME} !.gif$
this works if the image i am requesting is within a directory which exists. however, if the missing image is within a directory which doesn't exist, it does not match. Actually, here's where i'm a little unsure about how mod_rewrite works. i think what is happening is that mod_rewrite is passing over the image, but choking on the missing directory. is there any way to construct some mod_rewrite rules which will let me catch missing images and then completely bipass any further processing of that url request. by the way, i assumed that the [L] would do that...
i appreciate any suggestions...