Performance impact of rewrite conditions?
- by makeee
My web framework (cakephp) uses the following rewrite conditions and rule:
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
I serve up a lot of image files (~10 a second). I'm wondering if it would improve performance to have a rewrite rule that exempted requests for files in my images directory from even trying those rewrite conditions (checking whether the file exists). My traffic is constantly fluctuating, so this would be hard to benchmark, which is why I thought I'd ask here.
If that would be beneficial, how might I exclude files in "/images" directory from trying those conditions and rewrite rule?