From 7b163966a7bc06d15eb48815ee5bd6096b1632de Mon Sep 17 00:00:00 2001
From: Eric Covener The Module: mod_rewrite 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.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.
If your URL path does not exist verbatim on the filesystem,
or isn't directly under your DocumentRoot
,
@@ -896,7 +900,7 @@ later
<Directory>
sections, with some additional
+<Directory>
sections, with some additional
complexity.RewriteCond
.
^/
never
+never has a leading slash. Therefore, a Pattern with ^/
never
matches in per-directory context.<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 .htaccess
file,
This directive is required for per-directory rewrites whose context
is a directory made available via the
If your URL path does not exist verbatim on the filesystem,
or isn't directly under your