Hi, Thanks, I was just not sure anymore, too long ago.
But you say that the full URL consists of req.http.host and req.url, does that really matter in this case as req.url stays untouched ? 2015-01-07 14:03 GMT+01:00 Per Buer <[email protected]>: > On Wed, Jan 7, 2015 at 1:55 PM, Matt . <[email protected]> wrote: > >> Hi All, >> >> In the past I tested some scripts on on varnish for rewriting a >> domainname. >> >> My idea would be foo.com/* to bla.com/$1 >> >> Can I accomplish this with just something like: >> >> if (req.http.host ~ "foo.com") { >> set req.http.host = "bla.com/$1"; >> } >> > > Unless I missed something essential you could just do > > if (req.http.host ~ "foo.com") { > set req.http.host = "bar.com"; > } > > req.url will stay untouched. Remember that the full URL consists of > req.http.host and req.url. > > -- > *Per Buer* > CTO | Varnish Software AS > Cell: +47 95839117 > We Make Websites Fly! > www.varnish-software.com > [image: Register now] > <http://info.varnish-software.com/varnish-summits-autumn-2014-registration> >
_______________________________________________ varnish-misc mailing list [email protected] https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
