regsub, string concatenation?

Jon Drukman jsd at
Fri Apr 18 18:35:42 CEST 2008

i'm trying to rewrite all incoming URLs to include the http host header 
as part of the destination url.  example:



the originserver is parsing the original hostname out of the requested 
url.  works great with one hardcoded host:

set req.url = regsub(req.url, "^", "/site/");

i can't get it to use the submitted http host though...

  set req.url = regsub(req.url, "^", "/site/" +;

varnish complains about the plus sign.  is there some way to do this 
kind of string concatenation in the replacement?


More information about the varnish-misc mailing list