From: Christophe Jaillet Date: Sat, 5 Oct 2019 05:24:53 +0000 (+0000) Subject: Fix some typo and add some extra information. X-Git-Tag: 2.4.42~253 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=52fa1767973906de83d03959d7877ff59fc09c0b;p=thirdparty%2Fapache%2Fhttpd.git Fix some typo and add some extra information. (r1866243 in trunk) PR 63715 reported by WJCarpenter (bill-apache carpenter.org) Align some text in examples in order to synch a bit with trunk. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1867994 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/rewrite/advanced.xml b/docs/manual/rewrite/advanced.xml index 382a9a18ad3..e1950eff939 100644 --- a/docs/manual/rewrite/advanced.xml +++ b/docs/manual/rewrite/advanced.xml @@ -94,8 +94,8 @@ http://physical_host_of_user1/u/user/anypath RewriteEngine on -RewriteMap users-to-hosts "txt:/path/to/map.users-to-hosts" -RewriteRule "^/u/([^/]+)/?(.*)" "http://${users-to-hosts:$1|server0}/u/$1/$2" +RewriteMap users-to-hosts "txt:/path/to/map.users-to-hosts" +RewriteRule "^/u/([^/]+)/?(.*)" "http://${users-to-hosts:$1|server0}/u/$1/$2" @@ -128,7 +128,7 @@ RewriteRule "^/u/([^/]+)/?(.*)" "http://${users-to-hosts:$1|server0}/u/$1/$2 # This example is valid in per-directory context only RewriteCond "%{REQUEST_URI}" "!-U" -RewriteRule "^(.+)\.html$" "/regenerate_page.cgi" [PT,L] +RewriteRule "^(.+)\.html$" "/regenerate_page.cgi" [PT,L]

The -U operator determines whether the test string @@ -169,8 +169,8 @@ RewriteRule "^(.+)\.html$" "/regenerate_page.cgi" [PT,L] RewriteEngine on -RewriteMap lb "rnd:/path/to/serverlist.txt" -RewriteRule "^/(.*)" "http://${lb:servers}/$1" [P,L] +RewriteMap lb "rnd:/path/to/serverlist.txt" +RewriteRule "^/(.*)" "http://${lb:servers}/$1" [P,L]

serverlist.txt will contain a list of the servers:

@@ -311,10 +311,10 @@ RewriteRule "^foo\.html$" "foo.night.html"
Description:
-

At time, we want to maintain some kind of status when we +

At times, we want to maintain some kind of status when we perform a rewrite. For example, you want to make a note that you've done that rewrite, so that you can check later to see if a - request can via that rewrite. One way to do this is by setting an + request came via that rewrite. One way to do this is by setting an environment variable.

@@ -337,7 +337,10 @@ RewriteCond "%{ENV:rewritten}" "=1"

Note that environment variables do not survive an external redirect. You might consider using the [CO] flag to set a - cookie.

+ cookie. For per-directory and htaccess rewrites, where the final + substitution is processed as an internal redirect, environment + variables from the previous round of rewriting are prefixed with + "REDIRECT_".