So I'm working on a CSS/JS compressing system for a site, that has basically the following htaccess
RewriteEngine On
...
RewriteRule ^css/images/(.*)$ images/site/$1?%{QUERY_STRING} [L]
RewriteRule ^css/([0-9a-fA-F]{32})$ assets.php?hash=$1 [L]
RewriteCond %{HTTP_HOST} ^www.site.com [NC]
RewriteRule ^(.*)$ http://site.com/$1 [L,R=301]
RewriteRule ^([a-zA-Z0-9_.-]+)$ index.php?url=$1&%{QUERY_STRING} [L]
php_flag register_globals off
php_flag magic_quotes_gpc off
php_flag register_long_arrays off
# 404 Handler
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?url=$1&%{QUERY_STRING}
Right now assets.php isn't receiving the hash call, but rather index.php - if I remove the line RewriteRule ^([a-zA-Z0-9_.-]+)$ index.php?url=$1&%{QUERY_STRING} [L]
it works fine but I don't know why - shouldn't the [L] flag on the assets rewrite RewriteRule ^css/([0-9a-fA-F]{32})$ assets.php?hash=$1 [L]
prevent any further rewrites from being executed? I'm confused by whats happening here.
Any light you could shed on this would be much appreciated.