adding a double quote into a regsub in vcl_fetch

Paul A. Procacci pprocacci at datapipe.com
Tue Oct 15 23:00:13 CEST 2013


>  if (req.url ~ "^/blah") {
>                 set beresp.http.Link = regsub(req.url, "^/(blah).*",
> "<http://example.com/blah>; rel=\" + "canonical" + " ");
>                 return(deliver);
>         }
>

set beresp.http.Link = regsub(req.url, '^/blah.*', '<http://example.com/blah>; rel="canonical" ');

This maybe?

________________________________

This message may contain confidential or privileged information. If you are not the intended recipient, please advise us immediately and delete this message. See http://www.datapipe.com/legal/email_disclaimer/ for further information on confidentiality and the risks of non-secure electronic communication. If you cannot access these links, please notify us by reply message and we will send the contents to you. Unless otherwise specified in a written agreement, this e-mail neither constitutes an agreement to conduct transactions by electronic means nor creates any legally binding contract or enforceable agreement.



More information about the varnish-misc mailing list