Custom error message
Dag-Erling Smørgrav
des at linpro.no
Mon Aug 13 16:17:09 CEST 2007
Knut-Olav Hoven <hovenko at linpro.no> writes:
> If it is possible to issue a temporary redirect back to the user with a new
> url, that could work for my case.
Conceptually, something like this should work:
vcl_fetch() {
if (!obj.valid) {
set obj.status = 304;
set obj.http.location = "http://error.example.com/php-sucks.html";
pass;
}
}
It probably doesn't, though, and there may even be cases where the
backend code issues an error page directly instead of passing control
to vcl_fetch(). This would make a good Junior Varnish Hacker
Project...
DES
--
Dag-Erling Smørgrav
Senior Software Developer
Linpro AS - www.linpro.no
More information about the varnish-misc
mailing list