Pass 200 on 404

Hugo Cisneiros (Eitch) hugo.cisneiros at gmail.com
Tue Mar 5 05:32:02 CET 2013


On Tue, Mar 5, 2013 at 12:17 AM, Jeffrey Taylor <jefe78 at gmail.com> wrote:

> In regards to this issue. I had a further question.
>
> Is it possible to only pass this rule specifically when certain(3) file
> extensions are involved. I.e., Only when extentsions are .abc .abd .abe ?
>

Sure!

sub vcl_fetch {
  if (beresp.status == 404 && req.url ~ "\.ab(c|d|e)) {
    set beresp.ttl = 1m;
    error 200 "Not Found";
  }

  [...]
}

adding a regex to match the request url ending with .abc, .abd, .abe.

-- 
[]'s
Hugo
www.devin.com.br
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20130305/a030a024/attachment.html>


More information about the varnish-misc mailing list