]> granicus.if.org Git - apache/blobdiff - docs/manual/rewrite/flags.xml
Rebuild.
[apache] / docs / manual / rewrite / flags.xml
index e3685d87ef3b4a24f135f10c653ad7b220328d98..3c7aceef3e1e7c31a20e7226d25a34456cd02291 100644 (file)
@@ -70,7 +70,7 @@ 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.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>
@@ -94,6 +94,10 @@ isn't a valid URL, and so would be encoded as
 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
@@ -112,6 +116,9 @@ strings in the encoded form.</p>
 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>
@@ -240,10 +247,10 @@ variables work.</p>
 
 <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>
@@ -641,6 +648,23 @@ URI.
 
 </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.