You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Axel Beckert <ax...@dagstuhl.de> on 1999/05/11 22:44:43 UTC
mod_alias/4388: RedirectMatch quotes "#"
>Number: 4388
>Category: mod_alias
>Synopsis: RedirectMatch quotes "#"
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: apache
>State: open
>Class: sw-bug
>Submitter-Id: apache
>Arrival-Date: Tue May 11 13:50:01 PDT 1999
>Last-Modified:
>Originator: axel@dagstuhl.de
>Organization:
apache
>Release: 1.3.4
>Environment:
SunOS dagoffice 4.1.4 11 sun4m, gcc 2.6.3
>Description:
Many people link to our site and forget the "#" for jumping to the appropriate
entry on a page. E.g. instead of linking to /DATA/Seminars/99/#99421 they link
to /DATA/Seminars/99/99421. Due to having more than one path where this happens
(for every year since 1990 at least three occurences) I want and because of
Redirect matches only complete paths and not parts of directory names (see
beyond and RTFM to Redirect) I'm forced to use RedirectMatch instead of
Redirect. So I wrote:
RedirectMatch permanent ^/DATA/Seminars/([0-9][0-9])/([0-9][0-9][0-9][0-9][0-9]?)(\.html|/.*)?$ http://www.dagstuhl.de:8042/DATA/Seminars/$1/#$2
If I now request http://www.dagstuhl.de:8042/DATA/Seminars/99/99421 I get
redirected to http://www.dagstuhl.de:8042/DATA/Seminars/99/%2399421 instead of
http://www.dagstuhl.de:8042/DATA/Seminars/99/#99421 because RedirectMatch
quoted the "#" and returned it as "%23".
In comparision
Redirect permanent /99/99 http://www.dagstuhl.de:8042/DATA/Seminars/99/#99
redirects http://www.dagstuhl.de:8042/99/99 to
http://www.dagstuhl.de:8042/DATA/Seminars/99/#99 as it should. Unfortunately
redirect matches no path components, e.g. it matches /99/99 but not /99/99421,
so I am forced to use RedirectMatch...
BTW: This seems to be similar to #4379 and #3333, which both have the same
problem with quoted question marks. Mainly I wrote this bug report, because I
fear that, if that both bugs are fixed and only the "?" won't be quoted anymore,
the same problem with quoted hashes may resist.
>How-To-Repeat:
http://www.dagstuhl.de:8042/DATA/Seminars/99/99421
>Fix:
Don't let RedirectMatch quote hashes and question marks. AFAIK there shouldn't
be any other exceptions.
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <ap...@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! ]