]> granicus.if.org Git - apache/commitdiff
more fixes for per-dir explanation
authorEric Covener <covener@apache.org>
Sat, 20 Aug 2016 19:24:56 +0000 (19:24 +0000)
committerEric Covener <covener@apache.org>
Sat, 20 Aug 2016 19:24:56 +0000 (19:24 +0000)
change style of per-dir note for readability

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1757027 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/mod/mod_rewrite.xml

index d9c54faf03a40bb1552229a9aafb2c88f6a321a3..4bd90ba6a1e2af263f4c8ae3b110c9bce78bf8df 100644 (file)
@@ -1050,25 +1050,38 @@ RewriteRule  "^/$"                 "/homepage.std.html"     [L]
       on where the <directive>RewriteRule</directive> directive is defined. </p>
 
 <note><title><a id="what_is_matched" name="what_is_matched">What is matched?</a></title>
-      <p>In <directive module="core">VirtualHost</directive> context,
+
+<ul>
+      <li><p>In <directive module="core">VirtualHost</directive> 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 <directive module="core">Directory</directive> 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 <directive
+      This is the (%-decoded) <a href="directive-dict.html#Syntax">URL-path</a>.</p></li>
+
+      <li><p>In <directive module="core">Directory</directive> 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 <directive>RewriteRule</directive> 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 <directive
       >DocumentRoot</directive> and <directive>Alias</directive>, or even the 
       result of previous <directive>RewriteRule</directive> 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
       <directive module="mod_rewrite">RewriteCond</directive> with the
       <code>%{HTTP_HOST}</code>, <code>%{SERVER_PORT}</code>, or
-      <code>%{QUERY_STRING}</code> variables respectively.</p>
+      <code>%{QUERY_STRING}</code> variables respectively.</p></li>
+</ul>
 </note>
 
 <note><title>Per-directory Rewrites</title>