Custom error message

Dag-Erling Smørgrav des at
Mon Aug 13 16:17:09 CEST 2007

Knut-Olav Hoven <hovenko at> 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 = "";

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

Dag-Erling Smørgrav
Senior Software Developer
Linpro AS -

More information about the varnish-misc mailing list