From: Rich Bowen
Date: Wed, 11 Jan 2023 18:47:21 +0000 (+0000)
Subject: Addresses https://bz.apache.org/bugzilla/show_bug.cgi?id=53108 -
X-Git-Tag: 2.5.0-alpha2-ci-test-only~153
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6438cd7ea8498b5bd76890ed9f63e392d5f4e5fb;p=thirdparty%2Fapache%2Fhttpd.git
Addresses https://bz.apache.org/bugzilla/show_bug.cgi?id=53108 -
explains the difference between rewriting to a full filesystem path vs a
webroot local path.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1906612 13f79535-47bb-0310-9956-ffa450edef68
---
diff --git a/docs/manual/rewrite/intro.xml b/docs/manual/rewrite/intro.xml
index d0897fdc0d3..4d487f03406 100644
--- a/docs/manual/rewrite/intro.xml
+++ b/docs/manual/rewrite/intro.xml
@@ -236,7 +236,7 @@ value.
The Substitution can itself be one of three things:
-- A full filesystem path to a resource
+- 1. A full filesystem path to a resource
-
RewriteRule "^/games" "/usr/local/games/web"
@@ -245,18 +245,19 @@ RewriteRule "^/games" "/usr/local/games/web"
like the Alias directive.
-A web-path to a resource
+2. A web-path to a resource
-RewriteRule "^/foo$" "/bar"
+RewriteRule "^/foo/?$" "/bar"
If DocumentRoot is set
to /usr/local/apache2/htdocs
, then this directive would
map requests for http://example.com/foo
to the
path /usr/local/apache2/htdocs/bar
.
+
-An absolute URL
+3. An absolute URL
RewriteRule "^/product/view$" "http://site2.example.com/seeproduct.html" [R]
@@ -265,6 +266,8 @@ RewriteRule "^/product/view$" "http://site2.example.com/seeproduct.html" [R]
+Note that 1 and 2 have exactly the same syntax. The difference between them is that in the case of 1, the top level of the target path (i.e., /usr/
) exists on the filesystem, where as in the case of 2, it does not. (i.e., there's no /bar/
as a root-level directory in the filesystem.)
+
The Substitution can also
contain back-references to parts of the incoming URL-path
matched by the Pattern. Consider the following: