URL rewrite with Varnish

Rafał Zawierta zawierta at gmail.com
Tue Apr 3 14:52:01 CEST 2012


Hello,

Is it possible to handle such case: my webapp is running on
http://10.0.0.10:8888/content/site/EN.html and whole site is on base url:
http://10.0.0.10:8888/content/site/.

I want to make my site available via Varnish on url:
http://mysite.mydomain.com/ - I want to remove whole stuff after / from url.

Rule:
sub vcl_recv {
if (req.http.host ~ "^(www\.)?mysite\.mydomain\.com$" ) {
  set req.url = regsub(req.url, "^/content/site/", "/");
}
}

isn't working at all.

Regards
R.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20120403/1fdc80d2/attachment.html>


More information about the varnish-misc mailing list