from https://stackoverflow.com/questions/15597174/varnish-redirection

In vcl_recv:

|set req.http.x-Redir-Url = "http://newdomain.com"; + req.url;
error 750 req.http.x-Redir-Url;
|

In vcl_error:

|if (obj.status == 750) {
    set obj.http.Location = obj.response;
    set obj.status = 301;
    return(deliver);
}
|




--
Sent from Postbox <https://www.postbox-inc.com/?utm_source=email&utm_medium=siglink&utm_campaign=reach>


[email protected] wrote:
Thank you about your reply. I am using varnish 3 and tried the following configuration:

if (req.http.host ~ "thedomain\.com" && req.url~ "^/disclib/download/") { set req.backend = filedownload; set req.http.connection = "close"; return (pipe); }

as I defined befor the backend filedownload, but the result is service unavailable.

Any other suggestions?

_______________________________________________
varnish-misc mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

Reply via email to