- <p>In <code class="directive"><a href="../mod/core.html#directory">Directory</a></code> and htaccess context,
- the <em>Pattern</em> will initially be matched against the
- <em>filesystem</em> path, after removing the prefix that led the server
- to the current <code class="directive">RewriteRule</code> (e.g. "app1/index.html"
- or "index.html" depending on where the directives are defined).</p>
+<ul>
+ <li><p>In <code class="directive"><a href="../mod/core.html#virtualhost">VirtualHost</a></code> context,
+ The <em>Pattern</em> will initially be matched against the part of the
+ URL after the hostname and port, and before the query string (e.g. "/app1/index.html").
+ This is the (%-decoded) <a href="directive-dict.html#Syntax">URL-path</a>.</p></li>
+
+ <li><p>In per-directory context (<code class="directive"><a href="../mod/core.html#directory">Directory</a></code> and .htaccess),
+ the <em>Pattern</em> is matched against only a partial path, for example a request
+ of "/app1/index.html" may result in comparison against "app1/index.html"
+ or "index.html" depending on where the <code class="directive">RewriteRule</code> is
+ defined.</p>
+
+ <p>The directory path where the rule is defined is stripped from the currently mapped
+ filesystem path before comparison (up to and including a trailing slash).
+ The net result of this per-directory prefix stripping is that rules in
+ this context only match against the portion of the currently mapped filesystem path
+ "below" where the rule is defined.</p>
+
+ <p>Directives such as <code class="directive">DocumentRoot</code> and <code class="directive">Alias</code>, or even the
+ result of previous <code class="directive">RewriteRule</code> substitutions, determine
+ the currently mapped filesystem path.
+ </p>
+ </li>