From: Rich Bowen
Date: Wed, 11 Jan 2023 18:50:11 +0000 (+0000)
Subject: Addresses bug https://bz.apache.org/bugzilla/show_bug.cgi?id=53108
X-Git-Tag: 2.4.56-candidate~50
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad165d843966e4e7ab5c35681bb6c6118a895dc3;p=thirdparty%2Fapache%2Fhttpd.git
Addresses bug https://bz.apache.org/bugzilla/show_bug.cgi?id=53108
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1906614 13f79535-47bb-0310-9956-ffa450edef68
---
diff --git a/docs/manual/rewrite/intro.html.en b/docs/manual/rewrite/intro.html.en
index 0f37cbbfbe7..9e7642836be 100644
--- a/docs/manual/rewrite/intro.html.en
+++ b/docs/manual/rewrite/intro.html.en
@@ -231,7 +231,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"
@@ -239,17 +239,18 @@ value.
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]
@@ -257,6 +258,8 @@ path /usr/local/apache2/htdocs/bar
.
+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:
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: