I have a .htaccess file with a number of RewriteRules.
How can I exclude already existing files and directories from having run through each of the RewriteCond
/ RewriteRule
pairs?
This:
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule .* - [F,L]
won't work reliably because according to this SO question:
within the .htaccess context, [L] will not force mod_rewrite to stop. it will continue to trigger internal sub-requests:
How can I make this work? Alternatively, is ther a control structure like if condition applies, go through this block of rules, otherwise skip and go to end in mod_rewrite?