From: Eric Covener
Date: Thu, 6 Jan 2011 02:12:01 +0000 (+0000)
Subject: clarify RewriteBase as action for closed PR50546
X-Git-Tag: 2.3.11~262
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7b163966a7bc06d15eb48815ee5bd6096b1632de;p=apache
clarify RewriteBase as action for closed PR50546
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1055710 13f79535-47bb-0310-9956-ffa450edef68
---
diff --git a/docs/manual/mod/mod_rewrite.html.en b/docs/manual/mod/mod_rewrite.html.en
index 136e629c49..cd4118dd26 100644
--- a/docs/manual/mod/mod_rewrite.html.en
+++ b/docs/manual/mod/mod_rewrite.html.en
@@ -113,16 +113,20 @@ URLs on the fly
Module: | mod_rewrite |
The RewriteBase
directive explicitly
- sets the base URL-path (not filesystem directory path!) for per-directory rewrites.
+ sets the base URL-path (not filesystem directory path!) for per-directory rewrites
+ that result in the substitution of a relative path.
When you use a RewriteRule
in a .htaccess
file, mod_rewrite
strips off
the local directory prefix before processing, then rewrites the rest of
the URL. When the rewrite is completed, mod_rewrite
- automatically adds the local directory prefix back on to the path.
+ automatically adds the local directory prefix (or the
+ RewriteBase
when set) back on to the substitution
+ before handing it back to the core of the server as if it were the original
+ URL.
This directive is required for per-directory rewrites whose context
is a directory made available via the Alias
- directive.
+ directive, when the substitution uses a relative path.
If your URL path does not exist verbatim on the filesystem,
or isn't directly under your DocumentRoot
,
@@ -896,7 +900,7 @@ later
Per-directory Rewrites
-- The rewrite engine may be used in .htaccess files in
<Directory>
sections, with some additional
+ - The rewrite engine may be used in .htaccess files and in
<Directory>
sections, with some additional
complexity.
- To enable the rewrite engine in this context, you need to set
@@ -920,7 +924,7 @@ relative substutions.
a RewriteCond
.
- The removed prefix always ends with a slash, meaning the matching occurs against a string which
-never has a leading slash. Therefore, A Pattern with
^/
never
+never has a leading slash. Therefore, a Pattern with ^/
never
matches in per-directory context.
- Although rewrite rules are syntactically permitted in
<Location>
and <Files>
sections, this
diff --git a/docs/manual/mod/mod_rewrite.xml b/docs/manual/mod/mod_rewrite.xml
index 19f2db22ea..fbca1dc83b 100644
--- a/docs/manual/mod/mod_rewrite.xml
+++ b/docs/manual/mod/mod_rewrite.xml
@@ -279,16 +279,20 @@ Apache HTTP Server 2.0.41 and later
The RewriteBase directive explicitly
- sets the base URL-path (not filesystem directory path!) for per-directory rewrites.
+ sets the base URL-path (not filesystem directory path!) for per-directory rewrites
+ that result in the substitution of a relative path.
When you use a RewriteRule
in a .htaccess
file, mod_rewrite strips off
the local directory prefix before processing, then rewrites the rest of
the URL. When the rewrite is completed, mod_rewrite
- automatically adds the local directory prefix back on to the path.
+ automatically adds the local directory prefix (or the
+ RewriteBase when set) back on to the substitution
+ before handing it back to the core of the server as if it were the original
+ URL.
This directive is required for per-directory rewrites whose context
is a directory made available via the Alias
- directive.
+ directive, when the substitution uses a relative path.
If your URL path does not exist verbatim on the filesystem,
or isn't directly under your DocumentRoot,