0

I have excluded the url like this from my varnish cache

if (req.url ~ "^/folder_name/") {
  return (pass);
}

but still when i access curl -I http://ip/folder_name i see the below response

HTTP/1.1 301 Moved Permanently
Date: Mon, 04 Jul 2016 08:48:46 GMT
Server: Apache/2.2.15 (CentOS)
Location: http://ip/folder_name/
Content-Length: 319
Content-Type: text/html; charset=iso-8859-1
X-Varnish: 294958
Age: 0
Via: 1.1 varnish-v4
Connection: keep-alive

Can anyone please tell me what am i doing wrong, i need to exclude "all urls that start with /folder_name" from being cached in varnisg

opensource-developer
  • 2,826
  • 4
  • 38
  • 88

1 Answers1

1

Your regex ends in a slash and "http://ip/folder_name does" not - could this be it?

Ronald
  • 2,864
  • 3
  • 25
  • 36