From: Eric Covener
Date: Sat, 20 Aug 2016 19:04:40 +0000 (+0000)
Subject: more per-dir cleanup, remove redundant text.
X-Git-Tag: 2.5.0-alpha~1234
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=30e85303011e1aa49ccb69a2d29bb48e86aad7ea;p=thirdparty%2Fapache%2Fhttpd.git
more per-dir cleanup, remove redundant text.
PR60024
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1757023 13f79535-47bb-0310-9956-ffa450edef68
---
diff --git a/docs/manual/mod/mod_rewrite.xml b/docs/manual/mod/mod_rewrite.xml
index 2069ae5f1d6..2c7312e7fad 100644
--- a/docs/manual/mod/mod_rewrite.xml
+++ b/docs/manual/mod/mod_rewrite.xml
@@ -1046,24 +1046,24 @@ RewriteRule "^/$" "/homepage.std.html" [L]
Pattern is
a perl compatible regular
- expression.
- the (%-decoded) URL-path
- 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.
+ expression. What this pattern is compared against varies depending
+ on where the RewriteRule directive is defined.
What is matched?
In VirtualHost context,
The Pattern 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) URL-path
+ This is the (%-decoded) URL-path.
In Directory and htaccess context,
- the Pattern will initially be matched against the
- filesystem path, after removing the leading directory path where the
- RewriteRule was defined. In this context,
- some example strings matched against are "index.html and "app1/index.html
- (but never anything beginning with a slash).
+ the Pattern 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 DocumentRoot and Alias, or even the
+ result of previous RewriteRule 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.
If you wish to match against the hostname, port, or query string, use a
RewriteCond with the
@@ -1093,12 +1093,7 @@ administrator has disabled override of FollowSymLinks for
a user's directory, then you cannot use the rewrite engine. This
restriction is required for security reasons.
-
When using the rewrite engine in .htaccess files the
-per-directory prefix (which always is the same for a specific
-directory) is automatically removed for the RewriteRule pattern matching
-and automatically added after any relative (not starting with a
-slash or protocol name) substitution encounters the end of a rule set.
-See the RewriteBase
+See the RewriteBase
directive for more information regarding what prefix will be added back to
relative substitutions.