Re: [squid-users] url_rewrite_program

From: Henrik Nordstrom <henrik@dont-contact.us>
Date: Tue, 04 Sep 2007 04:52:23 +0200

On mån, 2007-09-03 at 21:07 -0400, alexus wrote:

> as i said i've got special URL that i need to send certain URLs and
> that URL will do whatever it needs to do and then send it back to
> original URL, so that user gets to his/her destination as expected,
> now i think when i get that URL sent to url_program_rewrite it does
> rewrite and since that URL sends user back to original URL and that
> URL is in my squid config set for rewrite, squid goes into loop
> here...

That would create a loop indeed, as the flow is

1. Browser requests URL
2. url rewriter rewrites the URL to another page
3. that page directs the browser back to the original URL
4. Back at 1..

One approach to solve this which might work for you us to in 3, add a
piece of information to the original URL telling your url rewriter that
this URL has already been redirected, and then have the url rewriter
strip this from the URL again when it's forwarded to the requested site.

Another approach is to not use the url rewriter interface at all, but
instead an external acl using the session helper.

What approach to use depends a bit on what exactly it is you want to do
and why..

Regards
Henrik

Received on Mon Sep 03 2007 - 20:52:29 MDT

This archive was generated by hypermail pre-2.1.9 : Mon Oct 01 2007 - 12:00:02 MDT