www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Clifton <rclif...@snowcrash.org>
Subject mod_alias/3333: RedirectMatch and Redirect rewrite URLs differently
Date Tue, 03 Nov 1998 01:52:26 GMT

>Number:         3333
>Category:       mod_alias
>Synopsis:       RedirectMatch and Redirect rewrite URLs differently
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Mon Nov  2 19:10:00 PST 1998
>Originator:     rclifton@snowcrash.org
>Release:        1.3.1
Solaris 2.6 (and 2.5), apache 1.3.1, gcc
SunOS enterprise 5.6 Generic sun4u sparc SUNW,Ultra-4
I am trying to user RedirectMatch to redirect to a servlet.  The config line looks like:

RedirectMatch ^/admin(.*)$ http://my.site.com/webj?func=y\&t=1$1

Apache is HTML encoding the '?' as %3f, which causes my servlet to be unable to parse the
variable string.  (%3f designates specifically to not treat it as a parameter).

If I user Redirect the string is not HTML encodes (unfortunately I need reg-ex parsing or
I wouldn't be writing this).

The following works correctly (the '?' is not encoded):

Redirect /admin http://my.site.com/webj?func=y&1

I read through all of the bug report and saw no mention of this, so I did not bother to upgrade
from 1.3.1 to 1.3.3.
Create two redirects:

Redirect /junk http://your.server.com/junk?x=1&y=2 (works)

final URL looks like : http://your.server.com/junk?x=1&y=2

RedirectMatch ^/junk2(.*) http://your.server.com/junk?x=1\&u=2$1 (encodes the '?')

final URL looks like: http://your.server.com/junk%3fx=1&u=2
RedirectMatch likely is doing an HTML encode unnecessarily.
[In order for any reply to be added to the PR database, ]
[you need to include <apbugs@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED.  This is not done]
[automatically because of the potential for mail loops. ]
[If you do not include this Cc, your reply may be ig-   ]
[nored unless you are responding to an explicit request ]
[from a developer.                                      ]
[Reply only with text; DO NOT SEND ATTACHMENTS!         ]

View raw message