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 <EM>Substitution</EM>.
+<h2><a name="quoting">Quoting Special Characters</a></h2>
+<p>
+As of Apache 1.3.20, special characters in <i>TestString</i> and
+<i>Substitution</i> 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 <i>Substitution</i> string
+by using '<code>\$</code>'; this keeps mod_rewrite from trying
+to treat it as a backreference.
+</p>
+
<H2><A NAME="InternalBackRefs">Regex Back-Reference Availability</A></H2>
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.
+<P>
+<LI>'<STRONG><CODE>noescape|NE</CODE></STRONG>' (<STRONG>n</STRONG>o URI
<STRONG>e</STRONG>scaping of output)<BR>
+ 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
+ <pre>
+ RewriteRule /foo/(.*) /bar?arg=P1\%3d$1 [R,NE]
+ </pre>
+ which would turn '<code>/foo/zed</code>' into a safe request
+ for '<code>/bar?arg=P1=zed</code>'.
+ <TABLE WIDTH="70%" BORDER=0 BGCOLOR="#E0E0F0" CELLSPACING=0
CELLPADDING=10>
+ <TR><TD>
+ <STRONG>Notice:</STRONG> The <code>noescape</code> flag is only available
+ with Apache 1.3.20 and later versions.
+ </TD></TR>
+ </TABLE>
<P>
<LI>'<STRONG><CODE>passthrough|PT</CODE></STRONG>' (<STRONG>p</STRONG>ass
<STRONG>t</STRONG>hrough to next handler)<BR>
This flag forces the rewriting engine to set the <CODE>uri</CODE> field
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]