Rewrite name.domain.tld to domain.tld/foo/bar-name

Matt . yamakasi.014 at gmail.com
Sat Jan 30 23:26:18 CET 2016


HI,

I'm trying to rewrite a domainname what is typed in the addressbar but
keep it overthere that way.

At the moment my vcl ends up with:

    set req.http.Host = regsub(req.http.X-Redirect-To, {"^([^/]+)/.*"}, "\1");
                set req.url = regsub(req.http.X-Redirect-To,
{"[^/]+(/.*)"}, "\1");
                std.syslog(29, "Redirecting to host "+req.http.Host+";
URI="+req.url);
                return (pass);

But this really seems to redirect.

What are my options here ?

Thanks,

Matt



More information about the varnish-misc mailing list