Received: (qmail 20998 invoked by uid 2012); 11 May 1999 20:44:43 -0000 Message-Id: <19990511204443.20997.qmail@hyperreal.org> Date: 11 May 1999 20:44:43 -0000 From: Axel Beckert Reply-To: axel@dagstuhl.de To: apbugs@hyperreal.org Subject: RedirectMatch quotes "#" X-Send-Pr-Version: 3.2 >Number: 4388 >Category: mod_alias >Synopsis: RedirectMatch quotes "#" >Confidential: no >Severity: non-critical >Priority: medium >Responsible: apache >State: closed >Quarter: >Keywords: >Date-Required: >Class: duplicate >Submitter-Id: apache >Arrival-Date: Tue May 11 13:50:01 PDT 1999 >Closed-Date: Sun May 06 13:11:16 PDT 2001 >Last-Modified: Sun May 06 13:11:16 PDT 2001 >Originator: axel@dagstuhl.de >Release: 1.3.4 >Organization: >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. >Release-Note: >Audit-Trail: State-Changed-From-To: open-closed State-Changed-By: rbb State-Changed-When: Sun May 6 13:11:16 PDT 2001 State-Changed-Why: This bug is being tracked in PR 7503. The second of the two patches should solve the problem of the '#' being escaped. Please test this patch, and let us know if it solves your problem. Class-Changed-From-To: sw-bug-duplicate Class-Changed-By: rbb Class-Changed-When: Sun May 6 13:11:16 PDT 2001 >Unformatted: [In order for any reply to be added to the PR database, ] [you need to include 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! ]