[squid-users] whats wrong with this url regex line

Amos Jeffries squid3 at treenet.co.nz
Sun Jan 19 09:22:56 UTC 2020


On 18/01/20 3:51 am, robert k Wild wrote:
> smashed it -
> 
> acl special_url url_regex ^http://updater.maxon.net/server_test.*
> http_access allow special_url
> 

It should work without the anchor and suffix. Perhapse the URL is not
actually that string?


 * any (.*) at beginning or end is assumed, so are stripped away by
Squid config loader.

 * the ^ anchor is only necessary to forbid sub-URL matches. eg URLs like:
  http://hello/q?http://updater.maxon.net/server_test

 * any characters within the URL which are special to regex are handled
as those *regex* commands. Not characters in the URL.

 These characters may clash between regex and URL:

    . ? ( ) [ ] - + * \


Amos


More information about the squid-users mailing list