SandyD
SandyD

Reputation: 113

Varnish Redirect domain root

With varnish, how can I redirect a domain root (e.x. http://mydomain.com/ ), but set a backend for everything else? (e.x. http://mydomain.com/everythingelse)

Upvotes: 0

Views: 660

Answers (1)

ghloogh
ghloogh

Reputation: 1684

You may just use next URL match in vcl_recv:

if (req.url == "/")
{
    #redirect actions
}
else
{
    set req.backend = somebackendname;
}

Upvotes: 1

Related Questions