Received: (qmail 24341 invoked by uid 2012); 10 May 1999 12:22:29 -0000 Message-Id: <19990510122229.24335.qmail@hyperreal.org> Date: 10 May 1999 12:22:29 -0000 From: Derek Smith Reply-To: derek@motortrak.com To: apbugs@hyperreal.org Subject: RedirectMatch cannot redirect to cgi script and pass parameters X-Send-Pr-Version: 3.2 >Number: 4379 >Category: mod_alias >Synopsis: RedirectMatch cannot redirect to cgi script and pass parameters >Confidential: no >Severity: non-critical >Priority: medium >Responsible: apache >State: closed >Quarter: >Keywords: >Date-Required: >Class: duplicate >Submitter-Id: apache >Arrival-Date: Mon May 10 05:30:01 PDT 1999 >Closed-Date: Sun May 06 12:42:23 PDT 2001 >Last-Modified: Sun May 06 12:42:23 PDT 2001 >Originator: derek@motortrak.com >Release: 1.3.6 >Organization: >Environment: SunOS motrak04 5.6 Generic_105181-11 sun4u sparc SUNW,Ultra-4 >Description: We are upgrading from NCSA to Apache and used to use the Redirect directive in .htaccess files to run cgi scripts and pass parameters to them on request of certain documents. We want to use the RedirectMatch directive as this is exactly the functionslity that we want. This solution doesn't seem to work though. If a RedirectMatch statement redirects URL that is the location of the cgi and parameters then the script fails. The exact same line works correctly if you use Redirect instead, but we require an explicit match as if you use point you browser at the redirected page but add a '/something' to the end, that gets appended to the rewritten URL and therefore appended to the last variables value. #This Works Redirect /some/place/to/redirect/from.html http://www.server.com/cgi-bin/script.cgi?var1=value #This Doesn't RedirectMatch ^/some/place/to/redirect/from.html$ http://www.server.com/cgi-bin/script.cgi?var1=value What I get is the error 'The document contained no data.' >How-To-Repeat: If you create a Redirect statement to a cgi including parameters(i.e. URL will include a '?') works fine, but if you use RedirectMatch it doesn't work. >Fix: >Release-Note: >Audit-Trail: State-Changed-From-To: open-closed State-Changed-By: rbb State-Changed-When: Sun May 6 12:42:23 PDT 2001 State-Changed-Why: This bug is being tracked in PR 7503. Please test the patch in that PR 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 12:42:23 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! ]