Drew Wrobel wrote:
Date: Fri, 8 Jan 2010 12:23:11 -0900
From: crobertson@xxxxxxx
To: squid-users@xxxxxxxxxxxxxxx
Subject: Re: Apache 301 redirects working with squid
Drew Wrobel wrote:
I have the redirects working with squid and apache.
Of course now I have a new wrinkle.
Here are the rules I currently have defined:
http_port 80 accel vport
cache_peer 172.21.174.78 parent 80 0 no-query originserver round-robin login=PASS
acl mainSite dstdomain www.company.com
http_access allow mainSite
cache_peer_access 172.21.174.78 allow mainSite
cache_peer_access 172.21.174.78 deny all
acl otherSites dstdomain .company.com
deny_info http://www.company.com/ otherSites
http_access deny otherSites
http_access deny all
I have about 70+ addtional domains that I need to redirect them all to the default of www.company.com
The domains are anything from 1800company.com, 1-800-comany.com, various .net/.biz/.org/.info and other
combinations.
It there a simple/easy acl that I can use as a catch all, if you will, for anything that isn't www.company.com to have it
redirected to www.company.com?
I haven't tested this, but I think it should work...
acl mainSite dstdomain www.company.com
http_access allow mainSite
http_access deny !mainSite
deny_info http://www.company.com/ mainSite
Chris
That seems to work. Here is that I have defined:
acl mainSite dstdomain www.company.com
http_access allow mainSite
http_access deny !mainSite
deny_info http://www.pepboys.com/ mainSite
http_access deny all
Wasn't sure if the last deny was needed but put it in as a catch all just in case.
Should the deny_info line end with mainSite or !mainSite?
Your deny_info line is correct.
Chris