Particular example to work, as httpd does not allow encoded slashes in URLs, and Note that you may also need to set AllowEncodedSlashes to On to get this With the B flag set on this same rule, the parameters are re-encodedīefore being passed on to the output URL, resulting in a correct mapping to Search.php?term=x%20&y%2Fz=, which is not what was intended. Isn't a valid URL, and so would be encoded as Without the Bįlag, this rewrite rule will map to 'search.php?term=x & y/z', which Given a search term of 'x & y/z', a browser will encode it as For example, consider the rule: RewriteRule "^search/(.*)$" "/search.php?term=$1" Using the B flag, non-alphanumeric characters in backreferences So backreferences are unescaped at the time they are applied. Mod_rewrite has to unescape URLs before mapping them, Note: The spaceĬharacter can be used in the list of characters to escape, but it cannot be In 2.4.26 and later, you can limit the escaping to specific characters The flag instructs RewriteRule to escape non-alphanumericĬharacters before applying the transformation.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |