Re: [squid-users] How are regular expressions handled in SQUIDs acls?

From: Try KDE <trykde@dont-contact.us>
Date: Mon, 16 Dec 2002 18:18:52 -0500

anton wrote:

>Hello all!
> At my work I need to configure squid to block all the large files, which
>are not needed for work, like *.mpeg, *.mpg, *.avi, *.mp3 and so worth.
>The right way is to create an access list url-regex and block all such
>URLs, but unfortunately i can't understand, how does the regexps work and
>how to create an acl for all these files.
> It should looks something like this:
>acl url-regex (.*avi$)|(.*mpeg$)|(.*mp3$)
> - but how exectly???
> Thanks in advance.
> Anton.
>
>
>
Anton,
I'm struggling with regular expression myself (grep vs. egrep), but I
think the following should work with Squid. Let me know if it indeed
works for you:
    acl all src 0.0.0.0/0.0.0.0
    acl bigfile urlpath-regex -i (\.avi$)|(\.mpeg$)|(\.mp3$)
    http_access deny bigfile
    http_access allow all

-tk

>
>
Received on Mon Dec 16 2002 - 16:17:40 MST

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