URL rewriting / ignoring query parameters?

Poul-Henning Kamp phk at phk.freebsd.dk
Mon Sep 10 20:35:17 CEST 2007


In message <DB38C99E-0E5F-4FD0-8505-3ED870F758CB at razz.com>, Tom Pepper writes:

>1) log the request exactly as it came from the client.  We use these  
>logs to track which distinct widget in the wild was viewed.

Varnish will alway record the request exactly as received.

>2) instruct varnish to ignore the query parameters and only cache one  
>instance of the swf for all of these requests.

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

should do it.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.



More information about the varnish-misc mailing list