Pass 200 on 404

Jeffrey Taylor jefe78 at gmail.com
Tue Mar 5 05:33:20 CET 2013


Very cool, thanks Hugo!

Jeff


On Mon, Mar 4, 2013 at 11:32 PM, Hugo Cisneiros (Eitch) <
hugo.cisneiros at gmail.com> wrote:

> 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/20130304/ee6dd286/attachment.html>


More information about the varnish-misc mailing list