How to ignore chars after question mark in URL?

Reinis Rozitis r at roze.lv
Tue Apr 3 16:38:09 CEST 2012


> Is it possible to ignore the presence of the question mark and the rest of the URL?

Yes.
https://www.varnish-cache.org/docs/trunk/faq/general.html

'How do I instruct varnish to ignore the query parameters and only cache one instance of an object?'

sub vcl_recv {
    set req.url = regsub(req.url, "\?.*", "");
}



More information about the varnish-misc mailing list