[squid-users] Refresh pattern issue in squid 3.1.20
eliezer at ngtech.co.il
Mon Dec 28 04:50:48 UTC 2015
The pattern you wrote is wrong and also doesn't describe your need\desire.
A domain name can contain only certain characters so using a "." is wrong.
Also url and domain regular expressions should be as strict as possible
so you would not have false positive matches.
Amos suggested to use:
refresh_pattern -i ^http://[a-zA-Z]+\.wsj\.net/ 10 200% 10 \
And you can tweak it a bit to something like:
refresh_pattern -i ^http://[a-z\-\_\.A-Z0-9]+\.wsj\.(net|net|com|edu)/
10 200% 10 \
which would describe what you want in a better way and will not produce
false positive matches.
I would suggest you to use the next online tools:
against a lost of urls such as you have mentioned:
And you can find couple real urls in your logs to match.
Once you have tested that different patterns you will be able to
understand the issue with your patterns a bit better.
On 28/12/2015 06:30, SaRaVanAn wrote:
> Thanks for prompt response.
> I want to match all the URL's which has a pattern of "wsj" (example: *.
> wsj.com, *.wsj.net, *.wsj.edu ) . Does wildcard makes sense in squid
> refresh pattern? Can we have something like this?
> refresh_pattern -i ^http://*\.wsj\.*/ 10 200% 10 \
> override-expire reload-into-ims
> - Saravanan N
More information about the squid-users