Bug 10961 - Redirect inside of <Directory XYZ> does not pass environment back to the browser
Summary: Redirect inside of <Directory XYZ> does not pass environment back to the browser
Status: CLOSED FIXED
Alias: None
Product: Apache httpd-1.3
Classification: Unclassified
Component: core (show other bugs)
Version: HEAD
Hardware: All All
: P3 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-07-18 18:59 UTC by Sean M. Alderman
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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/

...

</Directory>

-----
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 />
...
</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).