]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
more per-dir cleanup, remove redundant text.
authorEric Covener <covener@apache.org>
Sat, 20 Aug 2016 19:04:40 +0000 (19:04 +0000)
committerEric Covener <covener@apache.org>
Sat, 20 Aug 2016 19:04:40 +0000 (19:04 +0000)
PR60024

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

docs/manual/mod/mod_rewrite.xml

index 2069ae5f1d6517009704e086b4598eb0a74e6a21..2c7312e7fade70c02cc20e593044262277b773f6 100644 (file)
@@ -1046,24 +1046,24 @@ RewriteRule  "^/$"                 "/homepage.std.html"     [L]
 
       <p><a id="patterns" name="patterns"><em>Pattern</em></a> is
       a perl compatible <a id="regexp" name="regexp">regular
-      expression</a>. 
-      the (%-decoded) <a href="directive-dict.html#Syntax">URL-path</a>
-      of the request, or, in per-directory context (see below), the URL
-      path relative to that per-directory context. Subsequent patterns
-      are matched against the output of the last matching RewriteRule.</p>
+      expression</a>.  What this pattern is compared against varies depending
+      on where the <directive>RewriteRule</directive> directive is defined. 
 
 <note><title><a id="what_is_matched" name="what_is_matched">What is matched?</a></title>
       <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>
+      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> will initially be matched against the
-      <em>filesystem</em> path, after removing the leading directory path where the 
-      <directive>RewriteRule</directive> was defined. In this context,
-      some example strings matched against are "index.html and "app1/index.html
-      (but never anything beginning with a slash).  </p>
+      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
+      >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>
 
       <p>If you wish to match against the hostname, port, or query string, use a
       <directive module="mod_rewrite">RewriteCond</directive> with the
@@ -1093,12 +1093,7 @@ administrator has disabled override of <code>FollowSymLinks</code> for
 a user's directory, then you cannot use the rewrite engine. This
 restriction is required for security reasons.</li>
 
-<li>When using the rewrite engine in <code>.htaccess</code> files the
-per-directory prefix (which always is the same for a specific
-directory) is automatically <em>removed</em> for the RewriteRule pattern matching
-and automatically <em>added</em> after any relative (not starting with a
-slash or protocol name) substitution encounters the end of a rule set.
-See the <directive module="mod_rewrite">RewriteBase</directive>
+<li>See the <directive module="mod_rewrite">RewriteBase</directive>
 directive for more information regarding what prefix will be added back to
 relative substitutions.</li>