Re: [squid-users] to silly to redirect

From: Stefan M. Brandl <smb@dont-contact.us>
Date: Fri, 30 Nov 2001 11:41:38 +0100

On Fri, Nov 30, 2001 at 10:03:16AM +0100, Henrik Nordstrom wrote:
> "Stefan M. Brandl" wrote:
>
> I would say it seems it worked.
>
> Whatever you request you get redirected to http://www.r-kom.de/ EXACLY
> without notifying the browser. As there is no exception for www.r-kom.de
> itself, everything requested from there is also redirected to
> http://www.r-kom.de/, including links or images on the page.. As the
> browser is not notified, it still thinks it is on the originally
> requested site.
>

OK, yoe are absolutely right.
That's waht I wrote in my mail, but not what I wanted ;-)

> I think you may want a slightly smarter redirection than "redirect
> everything to http://www.r-kom.de/". Most likely you want "redirect
> everything except requests for www.r-kom.de to http://www.r-kom.de/
> using a browser redirect".
>
>
> #!/usr/bin/perl -n
> BEGIN { $|=1; }
> m%^http://www.r-kom.de/%i && print("\n") && next;
> print "302:http://www.r-kom.de/\n";
>

Yep, this works.

Thanks a lot
 Stefan

-- 
Stefan M. Brandl                                         R-KOM GmbH & Co. KG
E-Mail: smb@r-kom.de                                     Greflingerstr. 26
PGP-Key available at http://www.smbnet.de/pgpkey.php3    93055 Regensburg
Received on Fri Nov 30 2001 - 03:41:41 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:04:44 MST