Simple redirect to correct a URL

Kari Cowan KCowan at
Fri Jan 6 16:15:34 CET 2017

Thanks – I will move any followup questions over to the misc list.  That’s a great article – just wanted to say.

From: Guillaume Quintard [mailto:guillaume at]
Sent: Friday, January 06, 2017 12:15 AM
To: Kari Cowan <KCowan at>
Cc: Varnish Development <varnish-dev at>
Subject: Re: Simple redirect to correct a URL

Not to beat my own drum, but I blogged about this recently:

TL;DR: you need a 30X return code, and to put the new URL in the correct header (location).

On Jan 6, 2017 02:06, "Kari Cowan" <KCowan at<mailto:KCowan at>> wrote:
I’m sure I must be doing something hair-brained … shouldn’t this work in V5?

if (req.url~ "^/type/news?$") {
   return (synth (750,"http://" + req.http.Host + "/news/"));

varnish-dev mailing list
varnish-dev at<mailto:varnish-dev at>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the varnish-dev mailing list