You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by co...@apache.org on 2023/03/11 22:40:12 UTC

svn commit: r1908302 - /httpd/httpd/trunk/docs/manual/rewrite/flags.xml

Author: covener
Date: Sat Mar 11 22:40:11 2023
New Revision: 1908302

URL: http://svn.apache.org/viewvc?rev=1908302&view=rev
Log:
move B=xx example to the bottom

show example with quoted flags and a space

Modified:
    httpd/httpd/trunk/docs/manual/rewrite/flags.xml

Modified: httpd/httpd/trunk/docs/manual/rewrite/flags.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/rewrite/flags.xml?rev=1908302&r1=1908301&r2=1908302&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/rewrite/flags.xml (original)
+++ httpd/httpd/trunk/docs/manual/rewrite/flags.xml Sat Mar 11 22:40:11 2023
@@ -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
 <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>