Given this server configuration (this is a front-end lightweight
Apache, which uses mod_accel to proxy to a back-end mod_perl Apache):
ServerName www.shoujoai.com
ServerAlias shoujoai.com
AccelPass / http://127.0.0.1:8002/
and given a file called "redir.asp", which contains the following:
<% $Response->Redirect('http://127.0.0.1:8002/mush/'); %>
And given that I issue the following query to the web server:
GET /redir.asp HTTP/1.1
Host: shoujoai.com
and the following response:
Location: http://www.shoujoai.com/mush/
Is there a way to make mod_accel return "shoujoai.com" instead of
"www.shoujoai.com" when it rewrites the location header there? It's
using the default ServerName, instead of the Host header that the
client requested. This causes problems when cookies is set on an
alternative hostname, but the web browser gets redirected to the main
hostname. Is there a way to make it use the Host header when rewriting
an internal redirection URL?