John,

On Tue, 18 Jan 2005 [EMAIL PROTECTED] wrote:

> Hi,
> 
> I'm having a few problems trying to block file downloads with Squid. I have
> a file called 'restricted_files' with the following contents:
> 
> \.7z$
<snip>
> \.gz$
> \.gz?
> \.gz;
<snip>
> \.zoo;
> 
> And I have the following setup in my squid.conf:
> 
> acl User1 proxy_auth user1
> acl User2 proxy_auth user2
> acl BlockedDownloads urlpath_regex -i "/usr/local/ITIS/restricted_files"
> 
> http_access allow User1
> http_access deny BlockedDownloads
> http_access allow User2
> 
> Now, if I authenticate as user1, I can download all files with no problems.
> However, if I authenticate as user2, and browse to - for example -
> www.google.co.uk, cache.log is showing that the following URL's are blocked
> because they match 'BlockedDownloads':
> 
> http://www.google.co.uk/intl/en-uk/images/logo.gif
> http://www.google.co.uk/favicon.ico
> 
> However, these extensions are not in my list! I notice similar results on
> other sites, with files getting blocked that shouldn't be.
> 
> Can anyone offer me any help on this?
I believe that the following regex will be matching .gif files:

\.gz?

? means minimal match so it will match either '.g' or '.gz'.  You'll nee d
to escape a question mark:

\.gz\?

Hope this helps,


                                Neil.

-- 
Neil Hillard                    [EMAIL PROTECTED]
Westland Helicopters Ltd.       http://www.whl.co.uk/

Disclaimer: This message does not necessarily reflect the
            views of Westland Helicopters Ltd.


Reply via email to