Re: [squid-users] squid regex again :)

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Tue, 16 Sep 2003 08:26:58 +0200 (CEST)

On Tue, 16 Sep 2003, mdew wrote:

> I'm trying to block ads..
> http://somesite.com/something/ads/flash-advert.swf
>
> what would be the correct regex to block *somesite.com/something/ads/*

The following url_regex would block https:// or http:// (*.)somesite.com/something/ads/*

^https?://\([^/]*\.\)somesite\.com/something/ads/flash-advert\.swf$

or you could assume /something/ads/ on any server categorised as partially
having ads then you could use the following more efficient construct

acl partially_ads_server dstdomain ...
acl ads_path urlpath_regex ^/something/ads/
http_access deny partially_ads_server ads_path

Regards
Henrik
Received on Tue Sep 16 2003 - 00:27:17 MDT

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