From: Christophe Jaillet Date: Fri, 23 Mar 2018 22:08:13 +0000 (+0000) Subject: Add compatibility note for the 3rd argument of 'RewriteMap' X-Git-Tag: 2.4.34~271 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fd4e0609ca2986ffb75f4378db95e70d4ea99b6c;p=apache Add compatibility note for the 3rd argument of 'RewriteMap' (backported in 2.4.x in 1811748) Improve doc highlight (r1827603 and r1827605) in trunk git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1827607 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/mod/mod_rewrite.xml b/docs/manual/mod/mod_rewrite.xml index 7c5a2b5c9e..512be2b609 100644 --- a/docs/manual/mod/mod_rewrite.xml +++ b/docs/manual/mod/mod_rewrite.xml @@ -300,10 +300,12 @@ LogLevel alert rewrite:trace3 RewriteMap Defines a mapping function for key-lookup RewriteMap MapName MapType:MapSource - MapTypeOptions + [MapTypeOptions] server configvirtual host +The 3rd parameter, MapTypeOptions, in only available from Apache +2.4.30 and later

The RewriteMap directive defines a @@ -342,7 +344,7 @@ RewriteMap examplemap "txt:/path/to/file/map.txt"

You would then be able to use this map in a - RewriteRule as follows:

+ RewriteRule as follows:

RewriteRule "^/ex/(.*)" "${examplemap:$1}" @@ -590,7 +592,7 @@ AliasMatch "^/myapp" "/opt/myapp-1.2.3" UseCanonicalPhysicalPort respectively.

-

Those that are special to mod_rewrite include those below.

+

Those that are special to mod_rewrite include those below.

API_VERSION
@@ -743,9 +745,9 @@ AliasMatch "^/myapp" "/opt/myapp-1.2.3" per-server context (httpd.conf file) you must use %{LA-U:REMOTE_USER} - this variable is set by the authorization phases, which come - after the URL translation phase (during which mod_rewrite - operates).

-

On the other hand, because mod_rewrite implements + after the URL translation phase (during which + mod_rewrite operates).

+

On the other hand, because mod_rewrite implements its per-directory context (.htaccess file) via the Fixup phase of the API and because the authorization phases come before this phase, you just can use @@ -980,7 +982,7 @@ RewriteRule "^/images" "-" [F]

You can also set special flags for CondPattern by appending [flags] - as the third argument to the RewriteCond + as the third argument to the RewriteCond directive, where flags is a comma-separated list of any of the following flags:

@@ -1086,8 +1088,8 @@ RewriteRule "^/$" "/homepage.std.html" [L] this context only match against the portion of the currently mapped filesystem path "below" where the rule is defined.

-

Directives such as DocumentRoot and Alias, or even the +

Directives such as DocumentRoot and Alias, or even the result of previous RewriteRule substitutions, determine the currently mapped filesystem path.

@@ -1140,7 +1142,7 @@ to break in these contexts is relative substitutions. the mod_rewrite Introduction.

-

In mod_rewrite, the NOT character +

In mod_rewrite, the NOT character ('!') is also available as a possible pattern prefix. This enables you to negate a pattern; to say, for instance: ``if the current URL does NOT match this @@ -1425,7 +1427,7 @@ cannot use $N in the substitution string! Home directory expansion

When the substitution string begins with a string -resembling "/~user" (via explicit text or backreferences), mod_rewrite performs +resembling "/~user" (via explicit text or backreferences), mod_rewrite performs home directory expansion independent of the presence or configuration of mod_userdir.