Redirect to virtual server.

From: Benarson Behajaina <Benarson.Behajaina@dont-contact.us>
Date: Mon, 30 Mar 1998 19:17:59 +0200 (MET DST)

        Hi Squiders,

        I'm running Squid 1.1.20 (Linux 2.0.30),

I've tried the following redirector:

#!/usr/local/bin/perl
$|=1;
while (<>) {
    s@http://www.swh.sk@http://www.atm.sk@;
    print;
}

Where www.swh.sk is running Apache/1.2.4 and
www.atm.sk is the Apache non-IP Virtual Host
(i.e www.swh.sk and www.atm.sk use the same IP address,
but have different DocumentRoots).

Name: www.swh.sk
Address: x1.x2.x3.x4
DocumentRoot: /xxx/swh

Name: www.atm.sk
Address: x1.x2.x3.x4
DocumentRoot: /xxx/atm

So, if my request is http://www.swh.sk/
then my access.log :
891275403.029 272 pc5084.swh.sk TCP_MISS/304 135 GET http://www.atm.sk/ - FIRST_UP_PARENT/proxy.swh.sk -
That's OK, but the page I've got is not the page I wanted,
i.e Squid sent me the page from www.swh.sk/DocumentRoot instead
of www.atm.sk/DocumentRoot

Is it possible to redirect a REQUEST to a non-IP virtual host ?

Thanks,

Benarson.
Received on Mon Mar 30 1998 - 09:31:36 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:39:29 MST