<li><var>[flags]</var>: options affecting the rewritten request.</li>
</ol>
-<p>The <var>Pattern</var> is always a <a href="#regex">regular
-expression</a> matched against the URL-Path of the incoming request
-(the part after the hostname but before any question mark indicating
-the beginning of a query string) or, in per-directory context, against
-the request's path relative to the directory for which the rule is
-defined.</p>
+<p>The <var>Pattern</var> is a <a href="#regex">regular expression</a>.
+It is initially (for the first rewrite rule or until a substitution occurs)
+matched against the URL-path of the incoming request (the part after the
+hostname but before any question mark indicating the beginning of a query
+string) or, in per-directory context, against the request's path relative
+to the directory for which the rule is defined. Once a substitution has
+occured, the rules that follow are matched against the substituted
+value.
+</p>
<p class="figure">
<img src="../images/syntax_rewriterule.png" alt="Syntax of the RewriteRule directive" /><br />
<li><var>[flags]</var>: options affecting the rewritten request.</li>
</ol>
-<p>The <var>Pattern</var> is always a <a href="#regex">regular
-expression</a> matched against the URL-Path of the incoming request
-(the part after the hostname but before any question mark indicating
-the beginning of a query string) or, in per-directory context, against
-the request's path relative to the directory for which the rule is
-defined.</p>
+<p>The <var>Pattern</var> is a <a href="#regex">regular expression</a>.
+It is initially (for the first rewrite rule or until a substitution occurs)
+matched against the URL-path of the incoming request (the part after the
+hostname but before any question mark indicating the beginning of a query
+string) or, in per-directory context, against the request's path relative
+to the directory for which the rule is defined. Once a substitution has
+occured, the rules that follow are matched against the substituted
+value.
+</p>
<p class="figure">
<img src="../images/syntax_rewriterule.png"