Chris Robertson wrote:
Philipp Nyffenegger wrote:
Hello,
i'm facing a problem with selective Forwarding in Squid. I'm using
cache_peer_access to divert different URLs to different Scanning
Engines. Most of the ACL's are of type "dstdomains". They all work
fine.
Now my Problem is as follows :
.doubleclick.net is being sent to a URL-Filter which blocks the whole
.doubleclick.net Domain. Now i would like to have something like
"http://.*.doubleclick.net/blabla/" being sent towards AV Engine thus
allowing access to this specific Site/URL.
Whenever i add an url_regex ACL-Type like
"^http:\/\/.*\.doubleclick.net/blabla$" to a
"cache_peer_access"-Directive, it's never being redirected
accordingly. Squid does not complain about wrong ACL-Type used or the
like.
You don't need to escape the backslashes and "$" in a regular expression
matches "end of string". Try ...
^http://(.*\.)?doubleclick\.net/blabla
...instead.
You can also speed up all non-doubleclick requests handling by splitting
it into two ACL:
* the dstdomains which matches only doubleclick
* a urlpath_regex matching URL path piece
Constructing the access line so:
cache_peer_access ... deny <dstdomain> <urlpath_regex>
lets squid abort slow regex tests of the much faster dstdomain fails
first, (Left-to-right processing of access lines :-).
Amos
--
Please use Squid 2.7.STABLE4 or 3.0.STABLE8