On Wednesday 09 July 2003 09.14, Tan Jun Min wrote:
> Is there a ways to simplify these urls to avoid the use of
> url_regex or urlpath_regex in squid.conf.
>
> .*://.*.malaysia.net/sarawak/.*
> .*://.*twosteps.com.*/.*magnum4d.*/.*
> .*://.*.nifty.com.*/.*.jpg
> .*://.*lithium.sta.man.ac.uk:81.*/.*
> http://adserver.e-asia.com.my/RealMedia/ads/adstream_jx.cgi/www.amy
>.org.my/[EMAIL PROTECTED] http://202.186.154.16/appl/.*

For most, no. But the ones having known domains (domain not ending in 
.*) can be optimized by combining with a dstdomain acl type, allowing 
Squid to skip the url_regex if the host is not one for which you have 
URL filters..

The lithium URL is best blocked by a dstdomain acl alone..

# Aites or domains completely blocked
acl blocked_sites dstdomain ...
acl blocked_sites dstdomain_regex ...
http_access deny blocked_sites
http_access deny blocked_sites_regex

# Partial sites blocked
acl filtered_sites dstdomain ...
acl filtered_sites_regex dstdomain_regex ...
acl site_url_filters url_regex ...
http_access deny filtered_sites site_url_filters
http_access deny filtered_sites_regex site_url_filters

# general URL patterns blocked, not specific to a site or domain
acl filtered_urls url_regex ...
http_access deny filtered_urls

If the "site_url_filters" list becomes very large then you can split 
it on domains.

Regards
Henrik

Reply via email to