RE: [squid-users] url blocking

From: Zartash . <zartash_at_hotmail.com>
Date: Thu, 10 Feb 2011 05:25:09 +0000

So is there any way to block %?

----------------------------------------
> Date: Wed, 9 Feb 2011 21:27:25 +0000
> From: squid3_at_treenet.co.nz
> To: squid-users_at_squid-cache.org
> Subject: Re: [squid-users] url blocking
>
> On Wed, 9 Feb 2011 13:37:26 +0000, "Zartash ."
> wrote:
> > Dear All,We are blocking urls using url_regex feature (urls are stored
> in
> > a file), but we are unable to block urls having special characters (like
> > complete youtube video links or urls having % sign or ? etc). Can any
> one
> > let me know how can we block specific urls (rather then blocking whole
> > domain)?
>
> To regex match characters which are reserved in regex you need to escape
> them with \ characters:
>
> url_regex http://example.com/\?hello=world
>
> matches: http://example.com/?hello=world
>
>
> % are slightly different, in URLs they are used to encode raw binary
> characters. These are decoded back into binary form for the match. So your
> pattern wanting to detect a specific one of these should match the binary
> form. eg. %20 encodes hex binary 0x20 or character value 32 (spacebar).
>
> Amos
>
Received on Thu Feb 10 2011 - 05:25:15 MST

This archive was generated by hypermail 2.2.0 : Thu Feb 10 2011 - 12:00:02 MST