Re: [squid-users] Destination domain and regular expression

From: Alberto Cappadonia <alberto.cappadonia_at_polito.it>
Date: Fri, 02 Jul 2010 10:32:39 +0200

Il 02/07/10 01.40, Amos Jeffries ha scritto:
> Alberto Cappadonia wrote:
>> Hi all,
>>
>> If I want to deny the access, for example, to google and I want that
>> every
>> google web site (in any language) cannot be accessed, can I write an
>> acl
>> like the following?
>>
>> ------
>> acl googleDomains dstdom_regex -i .*\.google\..*
>>
>> http_access deny googleDomains
>> ------
>>
>> or i have to use other acl like url_regex ?
>
> For that use yes dstdom_regex is appropriate.
>
> The .* at the start and end of the pattern can be removed.
> Giving you:
> acl googleDomains dstdom_regex -i \.google\.

ok, thanks.

But this means that Squid automatically adds .* at the start and at the
end of the pattern?

this is valid for all the acls that support regex? (like ident_regex,
url_regex, etc..)

if I write:

acl googleDomains dstdom_regex -i \.google.com

is equivalent to .*\.google\.com.* ?

Regards
Alberto

Received on Fri Jul 02 2010 - 08:32:50 MDT

This archive was generated by hypermail 2.2.0 : Fri Jul 02 2010 - 12:00:03 MDT