/ Zope / Apsis / Pound Mailing List / Archive / 2009 / 2009-12 / redirect directive and hostname preservation

[ << ] [ >> ]

[ Re: [Pound Mailing List] undefined reference to ... ] [ connect: Can't assign requested address / Mattias ... ]

redirect directive and hostname preservation
Guillaume Memore <licks0repound(at)hotmail.com>
2009-12-17 10:09:46 [ FULL ]
Hello people of pound's mailing,

Today, my maze is the following thing:

I now have several websites being redirected on some internal servers, using
backends.
There's some special ones that need to be redirected on servers with paths at
the end.

I understood  the backend address cannot contain any path at the end of the
hostname/IP, so I use the 'Redirect' directive to get my server.
The problem is that, as it name says, redirect directly on the specified host I
give.

For example :

        Service
        HeadRequire "Host: .*site1.cla.ch.*"
        Redirect "http://192.168.1.13/my%20web/"
        End


This particular configuration will give the user on the internet to see
"http://192.168.1.13/my%web" in the
browser address field, which is not "correct", because then, the links are not
working anymore. (192.168.1.13 is off course unreachable from outside.)

The man page says the "RewriteLocation" directive is already 1 by default (I
was looking that direction, dunno it it's the good directive to play with..)

So final question is ...

Is there a way to "preserve the hostname" when doing redirections?

Tips, links are more than very welcome :-)

Thanks in advance,
Guillaume

 		 	   		  [...]
Attachments:  
text.html text/html 1920 Bytes

Re: [Pound Mailing List] redirect directive and hostname preservation
Dave Steinberg <dave(at)redterror.net>
2009-12-17 16:13:30 [ FULL ]
Guillaume Memore wrote:[...]

There's no way to work around this with pound.  Redirect directives send 
a HTTP redirect to the browser, which in turn goes and requests the 
indicated resource.

What you want is for pound to rewrite your requests and/or the HTML 
returned from the server, but it doesn't do that.  You should look at 
having the backends return HTML that will work in the contexts you need 
it to.

Regards,[...]

MailBoxer