Redirecting 1 web url to squid farm to alternative squid proxy

Issues related to applications and software problems
Post Reply
kbensch
Posts: 50
Joined: 2005/04/22 17:27:42
Location: Maidenhead, UK
Contact:

Redirecting 1 web url to squid farm to alternative squid pro

Post by kbensch » 2012/07/20 10:18:33

Hi

As the olympics is only 7 days away, we want to redirect all Olympics web streaming site, like BBC iPlayer from our main web proxy farm to a dedicated proxy with a dedicated internet link in order to prvent impact on the production network.


client ---> proxyfarm ---> if web page is not media content ---> Internet


client ---> proxyfarm ---> if media is content like on www.bbc.co.uk and sky.com ---> mediaproxy ---> Internet


We use squid 3.1.10 on centos 6.
Searching around I have found various solutions for redirecting urls to other urls, but nothing that indicates a solution as requested above.

Thanks
in advance

Kobus

kbensch
Posts: 50
Joined: 2005/04/22 17:27:42
Location: Maidenhead, UK
Contact:

Re: Redirecting 1 web url to squid farm to alternative squid proxy

Post by kbensch » 2012/07/20 10:32:40

I think I have found a solution in squids cache_peer_access directive.

Any additional comments are still welcome.

kbensch
Posts: 50
Joined: 2005/04/22 17:27:42
Location: Maidenhead, UK
Contact:

Re: Redirecting 1 web url to squid farm to alternative squid proxy

Post by kbensch » 2012/07/20 11:05:32

And boys and girls here is the solution to my problem


acl olympics_traffic url_regex "/etc/squid/olympicssites.txt"

cache_peer alt.squid_server_to_use.net parent 3128 0
cache_peer_access alt.squid_server_to_use.net allow olympics_traffic
cache_peer_access alt.squid_server_to_use.net deny all


Text file with URLS to redirect
^http://(.*)bbc(.*)/(.*)
^http://(.*).bbc.co.uk/(.*)
^http://(.*).bbci.co.uk/(.*)

kbensch
Posts: 50
Joined: 2005/04/22 17:27:42
Location: Maidenhead, UK
Contact:

Re: Redirecting 1 web url to squid farm to alternative squid proxy

Post by kbensch » 2012/07/20 11:13:23

Me again

Although the above is working, is there a way to redirect on content type?

Post Reply