You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2005/06/04 02:28:38 UTC

DO NOT REPLY [Bug 11265] - mod_rewrite fails to encode special characters

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=11265>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=11265





------- Additional Comments From alan.harder@sun.com  2005-06-04 02:28 -------
My comment isn't related to mod_proxy, but a general comment about rewrite rules
similar to the ones shown here.  It seems difficult with mod_rewrite to pass
possibly-urlencoded parts of a path as a query parameter to a script.. example:

RewriteRule test/(.+)$ /phpinfo.php?mytest=$1 [QSA,L]

If the URL contains test/one%23two then the query string as seen by phpinfo.php
will contain a literal # and thus be truncated.  Urlencoded & can also cause
trouble.  A couple workarounds: use a RewriteCond on THE_REQUEST to pull out the
still-encoded part of the path that is desired and put mytest=%1 in the rule;
or, add RewriteMap escape int:escape in the server config and use
mytest=${escape:$1} in the rule.  The former makes for more complicated rules,
the latter requires server config change and can't be done just in .htaccess..
neither seem like a great approach.
Just curious, what is the "recommended" approach for a rule like this?  Would be
great if escape function was always available, without a special rewritemap.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org