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=34602>.
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=34602





------- Additional Comments From [EMAIL PROTECTED]  2005-11-03 09:50 -------
(In reply to comment #6)
> RewriteRule   ^redirect/(.*)$ "/rewrite-test/test.cgi/$1"     [R,L]
> 
> Given that all I do is take part of the URL and change it, this should
> be the correct way of handling it.

I'm seeing exactly the same thing, for the same purpose, and also NE makes no 
difference - I have a 
redirect that accepts a url embedded with the url and passes it to a PHP script 
which then redirects to 
the embedded URL. I'd describe the problem differently - it's as if the matched 
subpattern has 
urldecode applied to it before it is passed to the output pattern.

I'm trying to avoid this being a me-too report, so here is a thoroughly 
unpleasant workaround: if you 
double-urlencode the incoming parameter, you end up with the string you were 
expecting in the output 
pattern. Here's what I want to be passing in:

http://www.example.com/u/http%3A%2F%2Fwww.apache.org%2F

This rule handles it:

RewriteRule ^u/(.*) redirect.php?url=$1 [R,L]

mod_rewrite generates an invalid URL:

redirect.php?url=http://www.apache.org/

If I double-urlencode the embedded URL:

http://www.example.com/u/http%253A%252F%252Fwww.apache.org%252F

I get:

redirect.php?url=http%3A%2F%2Fwww.apache.org%2F

which works, but undermines much of the point of having nice tidy mod_rewrite 
URLs.

Is this bug really this straightforward? I can't think of a circumstance where 
you'd want this behaviour 
and it's so simple that I can't believe that this has not been encountered 
before. I'm running 2.0.54 on 
MacOS X and 2.0.52 on RHEL 4 and both are acting this way.

-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to