redirect in varnish

Anders Nordby anders at
Wed Aug 6 16:57:33 CEST 2008


On Wed, Aug 06, 2008 at 02:28:01PM +0000, Poul-Henning Kamp wrote:
>>Instead of doing a redirect, it fetches pages off the default backend.
>>Why? How do I redirect to another URL on a different host, not served by
> You need to define that host as a backend.

Did that (and changed req.http.url to req.url - my mistake). This makes
Varnish fetch the content on that url/host, but instead of redirecting
(301/302 http code) it just fetches and returns the content (200 http
code). I want to redirect, not just fetch the content. Also it would be
nice to specify 301 or 302 http code for the redirect.



More information about the varnish-misc mailing list