The Apache docs would be more accurate if they said "...subject to rewriting by the following RewriteRule".
It is disappointing the docs don't mention it at all - since it's not obvious, but anyhow the easiest way to prove it is the source: apply_rewrite_rule in mod_rewrite.c
RewriteRule matching is preceded by this comment...
/* Try to match the URI against the RewriteRule pattern
* and exit immediately if it didn't apply.
*/
And after that we have this...
/* Ok, we already know the pattern has matched, but we now
* additionally have to check for all existing preconditions
* (RewriteCond) which have to be also true. We do this at
* this very late stage to avoid unnecessary checks which
* would slow down the rewriting engine.
*/
Curious to see performance given as the reason, since arguably simpler string header checks could be cheaper than the convoluted regexes that can occur - having the option to choose when the condition applied would allow the best performance. |