From: Eric Covener Date: Mon, 13 Mar 2023 15:52:49 +0000 (+0000) Subject: doc BNEG, improve related X-Git-Tag: 2.5.0-alpha2-ci-test-only~53 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed87e4619419909a75c6498f39984277130ea677;p=thirdparty%2Fapache%2Fhttpd.git doc BNEG, improve related git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1908352 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/mod/mod_rewrite.xml b/docs/manual/mod/mod_rewrite.xml index 8d21cbb7fed..0e196a9dbf0 100644 --- a/docs/manual/mod/mod_rewrite.xml +++ b/docs/manual/mod/mod_rewrite.xml @@ -1336,6 +1336,11 @@ cannot use $N in the substitution string! applying the transformation. details ... + + BCTLS + Like [B], but only escape control characters and spaces. + details ... + backrefnoplus|BNP If backreferences are being escaped, spaces should be escaped to diff --git a/docs/manual/rewrite/flags.xml b/docs/manual/rewrite/flags.xml index 9af48d6d5e7..9719e307cf7 100644 --- a/docs/manual/rewrite/flags.xml +++ b/docs/manual/rewrite/flags.xml @@ -113,10 +113,13 @@ the entire third argument of RewriteRule -# Escape spaces and question marks. +# Escape spaces and question marks. The quotes around the final argument +# are required when a space is included. RewriteRule "^search/(.*)$" "/search.php?term=$1" "[B= ?]" +

To limit the characters escaped this way, see flag_bneg +and flag_bctls

BNP|backrefnoplus (don't escape space to +) @@ -125,6 +128,13 @@ module="mod_rewrite">RewriteRule 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.

+ +# Escape spaces to %20 in the path instead of + as used in form submission via +# the query string +RewriteRule "^search/(.*)$" "/search.php/$1" "[B,BNP]" + + +

This flag is available in version 2.4.26 and later.

@@ -133,8 +143,29 @@ will be used in the path component rather than the query string.

control characters and the space character. This is the same set of characters rejected when they are copied into the query string unencoded.

+ + +# Escape control characters and spaces +RewriteRule "^search/(.*)$" "/search.php/$1" "[BCTLS]" + + +

This flag is available in version 2.5.1 and later.

+ + +
BNEG +

The [BNEG] flag modifies the behavior of escaping when the + the [B] flag is used with a list of specific characters to escape. + When [BNEG] is specified, the list of characters passed with [B=...] + are treated as exclusions to the list of characters to be escaped. +

+ +# Escape the default characters, but leave / +RewriteRule "^search/(.*)$" "/search.php?term=$1" "[B=/,BNEG]" + + +

This flag is available in version 2.5.1 and later.

C|chain