Hi,
Please correct me if I'm wrong, but I believe the way RewriteRedirect is
handled is wrong.
As far as I can tell, if the backend returns a location header, and it's
to a host known by any urlgroup directive, pound will rewrite the
location: header to point to the current hostname instead.
Can someone explain to me, how that could possibly be a useful feature?
I would expect the location header to be rewritten to point to the pound
port, but not the hostname to change.
For example, I have 4 domains all hosted on the same backend, which runs
on port 81.
However, 3 of them are set up so that any request on either of those 3,
are redirected to the same path on the primary domain.
Eg: http://www.domain.com/path/to/page.htm
-> 302 Found ->
http://domain.com.au/path/to/page.htm
Currently with rewriteredirect set to 1, this results in:
http://www.domain.com/path/to/page.htm
-> 302 Found ->
http://domain.com/path/to/page.htm
If I turn it off, I get:
http://www.domain.com/path/to/page.htm
-> 302 Found ->
http://domain.com.au/path/to/page.htm
Which is fine, but then relative redirects break, since they get
translated to http://domain.com.au:81/path/to/newpage.htm
In summary, I don't see the need for the hostname to be rewritten.
Regards,
John
|