Sending a ? to the backend

Ian Macdonald ianmac51 at gmail.com
Thu Sep 1 19:58:55 CEST 2016


Hi All,

I am having trouble rewriting a url I need to send a question mark to
the backend and it just does not seem to work I have tried escaping
the ?, long strings, regsub() and all seem to fail.  here is a snippet
if anyone can point me in the right direction

vcl_recv {
...

if (req.url ~ "^/myurl$") {

                        set req.url = {"/search?q=term"};
                        return (pass);




...

}

quick httpie check gets seems to show anything from the ? goes missing

 <p>The requested URL <code>/search</code> was not found on this
server.  <ins>That’s all we know.</ins>

varnish is 4.1.3 on centos 6.8

Cheers

Ian



More information about the varnish-misc mailing list