How to make a status 410 Gone for a URL in Varnish? Follow
Using Varnish you can force a web page or image or another asset at a URI to be status 410 Gone.
An example of Varnish code is below;
sub vcl_recv {
if (req.url ~ "/image/image_gallery/image-that-will-be-410-gone.jpg") {
return (synth(810, "Removed"));
}
}
sub vcl_synth {
if (resp.status == 810) {
set resp.status = 410;
return (deliver);
}
}
Comments
0 comments
Article is closed for comments.