From 2c571b327bb9093074a9d948fa619a6719c07830 Mon Sep 17 00:00:00 2001
From: Vincent Bray $N
in the substitution string!
Using the B flag, non-alphanumeric characters in backreferences
will be escaped. For example, consider the rule:
RewriteRule RewriteRule ^(.*)$ index.php?show=$1
- This will map /C++
to index.php?show=C++
.
+
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
+ 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
.
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.
-- 2.40.0