Jan Rasmussen wrote:
>
> Hi!
> > acl denymp3 url_regex mp3
> > http_access deny denymp3
>
> Won't that block any url with the string mp3? If it is only mp3 *files* I
> would make it :
>
> acl denymp3 url_regex .mp3$
I think you actually want
acl denymp3 -i urlpath_regex \.mp3$ \.mp3? \.mp3$
note: can alternatively be written as \.mp3($|?|;) or \.mp3$ \.mp3[?;]
or a number of other alternative ways..
urlpath_regex to match the URL path (and query string) only, not the
full URL
-i for case insensitivity
\. to match '.', not 'any character'
$ to match URL's ending in .mp3
? to match query URL's like
http://www.exampel.com/download/song.mp3?anything
; to match URL's with protocol parameters, like
ftp://ftp.example.com/download/song.mp3;type=i
Technical Note: "urlpath" in Squid is a little bit of a misnormer as it
matches more than only the URL path. It matches the URL Path plus any
trailing query or parameter strings.
Regards
Henrik Nordström
Squid Developer
Received on Sat Jan 19 2002 - 04:03:47 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:05:53 MST