With first method you will get problem with cached sites i.e.
http://test.one.com/dwonload.exe?cache ....
Will not get blocked with -i \.exe$
Where as problem with mime type is that the mime.conf get overwrites with the response from server I.e.
As per squid mime.conf .exe is application/octet-stream, but your rules to block application/octet-stream don't work when you download from MS site as it returns mime type as "application/x-msdownload".
Reg.
Prasanta
-----Original Message-----
From: Henrik Nordstrom [mailto:hno@squid-cache.org]
Sent: Monday, March 10, 2003 7:29 PM
To: NetSnake
Cc: squid-users@squid-cache.org
Subject: Re: [squid-users] block downloading extensions...!!
mån 2003-03-10 klockan 12.05 skrev NetSnake:
> It's very simple:
>
> acl MyDenyMIME urlpath_regex -i \.exe \.mov \.mpg \.mp?
you also need $ after the extension, and it is not at all related to MIME types, only file extensions in the requested URL..
acl MyDenyExtensions urlpath_regex -i \.exe$ \.mov$ \.mpg$ \.mp?$
> acl deny MyDenyMIME
http_access deny MyDenyExtension
If you want to block based on MIME types then see the rep_mime_type acl and http_reply_access.
Regards
Henrik
-- Henrik Nordstrom <hno@squid-cache.org> MARA Systems AB, Sweden
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:13:59 MST