howard chen wrote:
Hi,

On Wed, Mar 4, 2009 at 4:30 AM, Chris Robertson <crobert...@gci.net> wrote:
See the "forceddomain" argument to cache_peer.
http://www.squid-cache.org/Doc/config/cache_peer/

Is it possible to force into an URL?

e.g.

*.example.com/* => http://www.google.com/aboutus

I don't think that's possible with forceddomain, as it just rewrites the domain portion of the HTTP header. I'd use a deny_info page.

acl redirect_site dstdomain .example.com
http_access deny redirect_site
deny_info http://www.google.com/aboutus redirect_site

Either the deny_info page is going to have to be served from another domain than that which triggers the redirect, or you'll have to make your own error page (http://wiki.squid-cache.org/SquidFaq/SquidAcl#head-2931f707c7137629bad3cecc83d8a014c4818e0a).

Otherwise a url_rewrite_program (possibly accompanied by url_rewrite_access) would work. http://www.squid-cache.org/Doc/config/url_rewrite_program/, http://www.squid-cache.org/Doc/config/url_rewrite_access/

Chris

Reply via email to