Re: [SQU] Reverse proxy multiple targets

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Thu, 07 Sep 2000 21:59:51 +0200

Kailou Anassara wrote:

> This simple redirect.pl does not quite do the trick:
> #!/usr/bin/perl -p
> BEGIN { $|=1; }
> s%http://squid.domain.com/target1%http://target1.domain.com% && next;
> s%http://squid.domain.com/target2%http://target2.domain.com% && next;
>
> This will rewrite the address for me and serve my initial page
> request, but any links on the requested page are lost since the
> header no longer addresses the Squid.

What you are requesting is not possible with Squid. To make it work the
proxy must parse the HTML pages and replace any links with the rewritten
form.

Using an accelerator like this will only work if the target web server
uses relative links for all content and no absolute links. Care must
also be taken to not cause any client side redirects (seen for example
when requesting a directory, but forgetting the last slash)

--
Henrik Nordstrom
Squid hacker
--
To unsubscribe, see http://www.squid-cache.org/mailing-lists.html
Received on Thu Sep 07 2000 - 14:13:33 MDT

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