Bug 10961

Summary: Redirect inside of <Directory XYZ> does not pass environment back to the browser
Product: Apache httpd-1.3 Reporter: Sean M. Alderman <sean.m.alderman>
Component: coreAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: CLOSED FIXED    
Severity: normal    
Priority: P3    
Version: HEAD   
Target Milestone: ---   
Hardware: All   
OS: All   

Description Sean M. Alderman 2002-07-18 18:59:41 UTC
The following configuration example causes loss of the query string...

Servername xxx.xxx.com
#ScriptAlias /cgi-bin/ /usr/local/apache/cgi-bin
<Directory />
Redirect /cgi-bin/ http://yyy.xxx.com/cgi-bin/



With the above config -
Browser is pointed to http://xxx.xxx.com/cgi-bin/some.cgi?q=abc
Browser is sent a 302 with new location at http://yyy.xxx.com/cgi-bin/some.cgi

Using the redirect outside of the <Directory XYZ> block functions properly

ServerName xxx.xxx.com
#ScriptAlias /cgi-bin/ /usr/local/apache/cgi-bin/
Redirect /cgi-bin/ http://yyy.xxx.com/cgi-bin/
<Directory />

Browser points to http://xxx.xxx.com/cgi-bin/some.cgi?q=abc
Browser is sent a 302 with location of http://yyy.xxx.com/cgi-bin/some.cgi?q=abc

I have tested this repeatedly on RedHat 7.3 and Solaris 8.  Verifying both
visually with the browser and a network sniff.
Comment 1 André Malo 2003-03-01 01:42:36 UTC
The problem is fixed in main dev branch (2.1) and proposed for backport.

Thanks for your report and thanks for using Apache!
Comment 2 André Malo 2003-04-24 16:22:05 UTC
FYI: Finally merged into the 1.3 and 2.0 stable trees (1.3.28 and 2.0.46 will
include the fix).