Rewrite Url and hash

duja at duja at
Mon Jun 1 16:01:56 CEST 2009


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

Example, the url looks like this

but I want the hash to be 

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

More information about the varnish-misc mailing list