Rewrite Url and hash

duja at torlen.net duja at torlen.net
Wed Jun 3 11:05:37 CEST 2009


Anyone that has an answer or can help me with this?

/ D

Original Message -----------------------
Hi,

Im using varnish to cache certain urls depending on the querystring.

Example, the url looks like this
index.php?var1=123&var2=345&var3=567

but I want the hash to be 
index.php?var1=123

I have succeeded doing this but not 100%.
First of I tried to do the regsub replaces in vcl_hash but understood that this was the wrong because it didnt work as expected.
it got hash correctly but when next request was received it could not be found.

What im doing now is to rewrite the url in vcl_recv, with this the url us hashed and looked up correctly.

But the problem is that the url is sent rewritten to the backend which I dont want :(
How do I solve this? Should I set bereq.url before manipulating req.url?

/ D

_______________________________________________
varnish-misc mailing list
varnish-misc at projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc



More information about the varnish-misc mailing list