Rewrite domain and keep subdomain

Dridi Boukelmoune dridi at varni.sh
Mon Aug 24 09:59:28 CEST 2015


On Mon, Aug 24, 2015 at 1:41 AM, Matt . <yamakasi.014 at gmail.com> wrote:
> Hi Guys,
>
> I'm figuring out how I can rewrite a domain in a req.http.Host
>
> Like I type in my  addressbar: subdomain.myFIRSTdomain.tld
>
> Where Varnish needs to catch this using req.http.Host filter out the
> domainname and make req.http.Host actually:
>
> subdomain.mySECONDdomain.tld
>
> I'm figuring out how to do so, but I can't find the right way/docs.

Hi Matt,

This can be achieved with a regular expression, please find enclosed a
test case demonstrating how to do that.

Best Regards,
Dridi

> I hope someone can help me out !
>
> Thanks,
>
> Matt
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: subdomain.vtc
Type: application/octet-stream
Size: 478 bytes
Desc: not available
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20150824/eb4f1cae/attachment.obj>


More information about the varnish-misc mailing list