Re: [squid-users] URL redirection in offline mode

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Wed, 06 Oct 2010 05:25:17 +0000

On Wed, 6 Oct 2010 12:24:41 +0800, mohd hafiz <bmhafiz_at_gmail.com> wrote:
> Hi ,
>
> I need your advice about squid. I’m using squid 2.6. Can I do a url
> redirection in offline mode? I have setup my squid to transparent mode
> and redirector mode. My main goal of using squid is to intercept
> request from client and redirect it to local server in the network
> down situation.
> When the network is up, squid is working fine with each http requested
> is populated in the access log but not when network is down. The
> browser is still try to reach the internet even it Supposed to get
> redirected to local server in offline mode. Please do help me.

"offline_mode" the directive is badly named. It means merely to run with
extra long caching time in the estimate algorithms and without keeping
content fresh and relevant.

What you need is to configure a cache_peer to the alternative server and
turn "prefer_direct" on.
That way 'direct' access to the Internet is tried first and only if it
fails is the peer used.

Amos
Received on Wed Oct 06 2010 - 05:25:21 MDT

This archive was generated by hypermail 2.2.0 : Wed Oct 06 2010 - 12:00:02 MDT