<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.10 and later, you can limit the escaping to specific characters
+<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>
before being passed on to the output URL, resulting in a correct mapping to
<code>/search.php?term=x%20%26%20y%2Fz</code>.</p>
+<highlight language="config">
+RewriteRule "^search/(.*)$" "/search.php?term=$1" [B,PT]
+</highlight>
+
<p>Note that you may also need to set <directive
module="core">AllowEncodedSlashes</directive> to <code>On</code> to get this
particular example to work, as httpd does not allow encoded slashes in URLs, and
module="mod_rewrite">RewriteRule</directive> to escape the space character
in a backreference to %20 rather than '+'. Useful when the backreference
will be used in the path component rather than the query string.</p>
+
+<p>This flag is available in version 2.4.26 and later.</p>
+
</section>
<section id="flag_c"><title>C|chain</title>
<p>The full syntax for this flag is:</p>
-<example>
+<highlight language="config">
[E=VAR:VAL]
[E=!VAR]
-</example>
+</highlight>
<p><code>VAL</code> may contain backreferences (<code>$N</code> or
<code>%N</code>) which are expanded.</p>
</section>
+<section id="flag_qsl"><title>QSL|qslast</title>
+<p>
+By default, the first (left-most) question mark in the substitution
+delimits the path from the query string. Using the [QSL] flag instructs
+<directive module="mod_rewrite">RewriteRule</directive> to instead split
+the two components using the last (right-most) question mark. </p>
+
+<p>
+This is useful when mapping to files that have literal question marks in
+their filename. If no query string is used in the substitution,
+a question mark can be appended to it in combination with this flag. </p>
+
+<p> This flag is available in version 2.4.19 and later.</p>
+
+</section>
+
+
<section id="flag_r"><title>R|redirect</title>
<p>
Use of the [R] flag causes a HTTP redirect to be issued to the browser.