Re: [squid-users] How to deny urls without www ?

From: Adam <adam-s@dont-contact.us>
Date: Wed, 30 Apr 2003 12:16:02 -0700

----- Original Message -----
From: "Luiz Gustavo Sarubi Macchi" lgsm@mirassol.com.br
> acl urlsAllowados url_regex [-i] ^equifax sci sintegra cep emar symantec

In the squid.conf I see two different kinds of "url" oriented acls:

# acl aclname url_regex [-i] ^http:// ... # regex matching on whole
URL
# acl aclname urlpath_regex [-i] \.gif$ ... # regex matching on URL path

Thus you seem to be using the acl type that (only?) matches the *whole* URL.
Try the other one instead. Also the brackets should not be part of the
expression. They ( [] ) indicate that something is optional. So if you
want to use the option inside the brackets you should use only the -i
(ignore case) part. Additionally, do you realize that "^" means that
equifax can only be the first thing on the beginning of a url? ^ matches
the beginning of a url and $ (in the example with .gif above) matches the
end of the url. You probably don't need the ^ since the url will probably
be http://equifax.... or http://www.equifax....

 Here is how you might try to rewrite your acl with -i and urlPATH_regex
instead of the other one:

                     acl urlsAllowados urlpath_regex -i equifax sci sintegra
cep emar symantec

Try that and let the list know if it works/helps. Otherwise if it doesn't
hit one of the sites and check (and post if it helps) what registers in your
access.log file.

hope this helps,

Adam
Received on Wed Apr 30 2003 - 13:16:45 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:15:45 MST