]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
xforms
authorEric Covener <covener@apache.org>
Sat, 20 Aug 2016 19:25:05 +0000 (19:25 +0000)
committerEric Covener <covener@apache.org>
Sat, 20 Aug 2016 19:25:05 +0000 (19:25 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1757028 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/mod/mod_rewrite.html.en

index 8d4e047ad9038ca98f1ad3985d4cf2777420b9c9..e3b5cc07a042c0a7bf2979e6ebae0809e2a5faa8 100644 (file)
@@ -1048,32 +1048,37 @@ RewriteRule  "^/$"                 "/homepage.std.html"     [L]</pre>
       on where the <code class="directive">RewriteRule</code> directive is defined. </p>
 
 <div class="note"><h3><a id="what_is_matched" name="what_is_matched">What is matched?</a></h3>
-      <p>In <code class="directive"><a href="../mod/core.html#virtualhost">VirtualHost</a></code> context,
+
+<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>
-
-      <p>In <code class="directive"><a href="../mod/core.html#directory">Directory</a></code> and htaccess context,
-      the <em>Pattern</em> is matched against the trailing portion of the currently
-      mapped filesystem path with the rules own directory path removed from the beginning
-      (up to and including a trailing slash).  Directives such as <code class="directive">DocumentRoot</code> and <code class="directive">Alias</code>, or even the 
+      This is the (%-decoded) <a href="directive-dict.html#Syntax">URL-path</a>.</p></li>
+
+      <li><p>In <code class="directive"><a href="../mod/core.html#directory">Directory</a></code> and htaccess context,
+      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>In this context, only the trailing portion of the currently mapped
+      filesystem is compared against. The directory path where the rule is defined
+      is stripped 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 path 
+      "below" where they are 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.  The net result of this per-directory
-      prefix stripping is that rules in this context only match against the portion
-      of the currently mapped path "below" where they are defined.</p>
+      the currently mapped filesystem path.  
+      </p>
+      </li>
 
-      <p>If you wish to match against the hostname, port, or query string, use a
+      <li><p>If you wish to match against the hostname, port, or query string, use a
       <code class="directive"><a href="#rewritecond">RewriteCond</a></code> with the
       <code>%{HTTP_HOST}</code>, <code>%{SERVER_PORT}</code>, or
-      <code>%{QUERY_STRING}</code> variables respectively.</p>
-
-      <p>In any case, remember that regular expressions are substring
-      matches. That is, you don't need the regex to describe the entire
-      string, just the part that you wish to match. Thus, using a regex
-      of <code>.</code> is often sufficient rather than <code>.*</code>,
-      and the regex <code>abc</code> is <strong>not</strong> the same as
-      <code>^abc$</code>.</p>
-
+      <code>%{QUERY_STRING}</code> variables respectively.</p></li>
+</ul>
 </div>
 
 <div class="note"><h3>Per-directory Rewrites</h3>