Return-Path: Delivered-To: apmail-apache-docs-archive@apache.org Received: (qmail 52019 invoked by uid 500); 6 May 2001 22:03:29 -0000 Mailing-List: contact apache-docs-help@apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: apache-docs@apache.org Delivered-To: mailing list apache-docs@apache.org Received: (qmail 51979 invoked by uid 500); 6 May 2001 22:03:28 -0000 Delivered-To: apmail-httpd-docs-1.3-cvs@apache.org Date: 6 May 2001 22:03:27 -0000 Message-ID: <20010506220327.51975.qmail@apache.org> From: coar@apache.org To: httpd-docs-1.3-cvs@apache.org Subject: cvs commit: httpd-docs-1.3/htdocs/manual/mod mod_rewrite.html coar 01/05/06 15:03:27 Modified: htdocs/manual/mod mod_rewrite.html Log: Document new ability to escape characters in Rewrite* input strings using '\' (e.g., "\$" to keep it from having its special meaning), and NoEscape/NE flag to disable filtering the rewritten output through URI encoding. Revision Changes Path 1.57 +30 -0 httpd-docs-1.3/htdocs/manual/mod/mod_rewrite.html Index: mod_rewrite.html =================================================================== RCS file: /home/cvs/httpd-docs-1.3/htdocs/manual/mod/mod_rewrite.html,v retrieving revision 1.56 retrieving revision 1.57 diff -u -u -r1.56 -r1.57 --- mod_rewrite.html 2001/02/27 21:35:13 1.56 +++ mod_rewrite.html 2001/05/06 22:03:27 1.57 @@ -275,6 +275,17 @@ until no more conditions are available. If all conditions match, processing is continued with the substitution of the URL with Substitution. +

Quoting Special Characters

+

+As of Apache 1.3.20, special characters in TestString and +Substitution strings can be escaped (that is, treated as +normal characters without their usual special meaning) by prefixing them +with a slosh ('\') character. In other words, you can include an +actual dollar-sign character in a Substitution string +by using '\$'; this keeps mod_rewrite from trying +to treat it as a backreference. +

+

Regex Back-Reference Availability

One important thing here has to be remembered: Whenever you @@ -1660,6 +1671,25 @@ string part in the substitution string to the existing one instead of replacing it. Use this when you want to add more data to the query string via a rewrite rule. +

+

  • 'noescape|NE' (no URI escaping of output)
    + This flag keeps mod_rewrite from applying the usual URI escaping + rules to the result of a rewrite. Ordinarily, special characters + (such as '%', '$', ';', and so on) will be escaped into their + hexcode equivalents ('%25', '%24', and '%3B', respectively); this + flag prevents this from being done. This allows percent symbols + to appear in the output, as in +
      +    RewriteRule /foo/(.*) /bar?arg=P1\%3d$1 [R,NE]
      +    
    + which would turn '/foo/zed' into a safe request + for '/bar?arg=P1=zed'. + + +
    + Notice: The noescape flag is only available + with Apache 1.3.20 and later versions. +

  • 'passthrough|PT' (pass through to next handler)
    This flag forces the rewriting engine to set the uri field --------------------------------------------------------------------- To unsubscribe, e-mail: apache-docs-unsubscribe@apache.org For additional commands, e-mail: apache-docs-help@apache.org