From 80f5bdd29e6207d4d46ba35d869d93fe49379578 Mon Sep 17 00:00:00 2001
From: André Malo This document is still under development. This document is still under development. This document is still under development. Apache has to unescape URLs before mapping them,
so backreferences will be unescaped at the time they are applied.
Using the B flag, non-alphanumeric characters in backreferences
- will be escaped. For example, consider the rule:
+ will be escaped. For example, consider the rule:$N
in the substitution string!
/C++
to /index.php?show=/C++
.
- But it will also map /C%2b%2b
to
- /index.php?show=/C++
, because the %2b
- has been unescaped. With the B flag, it will instead map to
- /index.php?show=/C%2b%2b
.
This will map /C++
to
+ /index.php?show=/C++
. But it will also map
+ /C%2b%2b
to /index.php?show=/C++
, because
+ the %2b
has been unescaped. With the B flag, it will
+ instead map to /index.php?show=/C%2b%2b
.
This escaping is particularly necessary in a proxy situation, when the backend may break if presented with an unescaped URL.
diff --git a/docs/manual/rewrite/rewrite_flags.xml b/docs/manual/rewrite/rewrite_flags.xml index 2648d56999..53afe72470 100644 --- a/docs/manual/rewrite/rewrite_flags.xml +++ b/docs/manual/rewrite/rewrite_flags.xml @@ -172,12 +172,11 @@ that does not contain the literal.
character.
This can be also used to force the handler based on some conditions.
For example, the following snippet used in per-server context allows
.php
files to be displayed by mod_php
-if they are requested with the .phps
extension:
+if they are requested with the .phps
extension:
The regular expression above - ^(/source/.+\.php)s$
- will
match any request that starts with /source/
followed by 1 or
--
cgit v1.2.3