/ Zope / Apsis / Pound Mailing List / Archive / 2004 / 2004-09 / RewriteRedirect

[ << ] [ >> ]

[ Breaking pound cont'd / Mike Whitaker ... ] [ 500 Internal Server Error / "John ... ]

RewriteRedirect
"John Hansen" <john(at)oztralis.com.au>
2004-09-07 00:35:43 [ FULL ]
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

Re: RewriteRedirect
Robert Segall <roseg(at)apsis.ch>
2004-09-07 15:28:34 [ FULL ]
On Tuesday 07 September 2004 00.35, John Hansen wrote:[...]

The problem is that some back-ends are very bad at respecting the conventions 
- try convincing OpenACS to give you an https response for example.

I just uploaded a new -current which should address at least part of the 
problem. Give it a try and let us know.[...]

MailBoxer