I have lots directories which have the same image "_a.png",like these:
/data/images/{a,b,c,d}
Because this, the varnish cache multiple copies. Now I want to rewrite the urls to one,like this:
if (req.url ~ "/_pty.png$") {
set req.url="/images/a/_pty.png";
}
so I reload varnish but it not work in right! eg. I get the url, http://xx.com/images/c/_pty.png ,with varnishlog I find it's no right,the code above no effect! how to set?