VCL help needed
Poul-Henning Kamp
phk at phk.freebsd.dk
Tue Jan 30 10:18:51 CET 2007
In message <65c91d15180d6f5e92000bd1931e8db8 at zill.net>, Patrick Giagnocavo writ
es:
>Can I put a regexp in the vcl_fetch routine? Just add something like
>this to the stock vcl.conf:
>
>sub vcl_fetch {
> if (req.url - "/.css|.gif|.jpg|.mp3|.swf/") {
if (req.url ~ "\.css|\.gif|\.jpg|\.mp3|\.svf") {
If there are no tracker suffixes, it will be faster if you
anchor the regexps to the tail end of the url:
if (req.url ~ "\.css$|\.gif$|\.jpg$|\.mp3$|\.svf$") {
Other than that, yes, it should work just fine.
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
More information about the varnish-misc
mailing list