From 9c698e96a0ab0a6db402dca7e146f33328ee9c18 Mon Sep 17 00:00:00 2001
From: Rich Bowen
Because of this further manipulation of the URL in per-directory context, you'll need to take care to craft your rewrite rules @@ -149,16 +151,17 @@ and URL matching.
alt="Flow of RewriteRule and RewriteCond matching" />As you can see, first the URL is matched against the - Pattern of each rule. When it fails mod_rewrite - immediately stops processing this rule and continues with the +
First the URL is matched against the + Pattern of each rule. If it fails, mod_rewrite + immediately stops processing this rule, and continues with the next rule. If the Pattern matches, mod_rewrite looks - for corresponding rule conditions. If none are present, it - just substitutes the URL with a new value which is - constructed from the string Substitution and goes on + for corresponding rule conditions (RewriteCond directives, + appearing immediately above the RewriteRule in the configuration). + If none are present, it substitutes the URL with a new value, which is + constructed from the string Substitution, and goes on with its rule-looping. But if conditions exist, it starts an inner loop for processing them in the order that they are - listed. For conditions the logic is different: we don't match + listed. For conditions, the logic is different: we don't match a pattern against the current URL. Instead we first create a string TestString by expanding variables, back-references, map lookups, etc. and then we try -- 2.40.0