summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Covener <covener@apache.org>2023-03-11 23:40:11 +0100
committerEric Covener <covener@apache.org>2023-03-11 23:40:11 +0100
commitdce0f4bc54557f8f427dcd899d032563121d5722 (patch)
tree978ee263407f6ea035d0a7509d3371367e3bd309
parentadd [BCTLS] alternative to [B] for 2.4.56 problems (diff)
downloadapache2-dce0f4bc54557f8f427dcd899d032563121d5722.tar.xz
apache2-dce0f4bc54557f8f427dcd899d032563121d5722.zip
move B=xx example to the bottom
show example with quoted flags and a space git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1908302 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--docs/manual/rewrite/flags.xml17
1 files changed, 13 insertions, 4 deletions
diff --git a/docs/manual/rewrite/flags.xml b/docs/manual/rewrite/flags.xml
index 3e2012153f..7884d01e36 100644
--- a/docs/manual/rewrite/flags.xml
+++ b/docs/manual/rewrite/flags.xml
@@ -70,10 +70,6 @@ of how you might use them.</p>
<p>The [B] flag instructs <directive
module="mod_rewrite">RewriteRule</directive> to escape non-alphanumeric
characters before applying the transformation.</p>
-<p>In 2.4.26 and later, you can limit the escaping to specific characters
-in backreferences by listing them: <code>[B=#?;]</code>. Note: The space
-character can be used in the list of characters to escape, but it cannot be
-the last character in the list.</p>
<p><code>mod_rewrite</code> has to unescape URLs before mapping them,
so backreferences are unescaped at the time they are applied.
@@ -109,6 +105,19 @@ when the backend may break if presented with an unescaped URL.</p>
<p>An alternative to this flag is using a <directive module="mod_rewrite"
>RewriteCond</directive> to capture against %{THE_REQUEST} which will capture
strings in the encoded form.</p>
+
+<p>In 2.4.26 and later, you can limit the escaping to specific characters
+in backreferences by listing them: <code>[B=#?;]</code>. Note: The space
+character can be used in the list of characters to escape, but you must quote
+the entire third argument of <directive module="mod_rewrite">RewriteRule</directive>
+and the space must not be the last character in the list.</p>
+
+<highlight language="config">
+# Escape spaces and question marks.
+RewriteRule "^search/(.*)$" "/search.php?term=$1" "[B= ?]"
+</highlight>
+
+
</section>
<section id="flag_bnp"><title>BNP|backrefnoplus (don't escape space to +)</title>