redirect in varnish

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


Hi,

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
>>Varnish?
> 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.

Bye,

-- 
Anders.



More information about the varnish-misc mailing list