url rewrite - varnish

nicée lenny bessay nlbessay at yahoo.fr
Tue Feb 5 11:29:11 CET 2013


Hi Sir,

I'm having problem rewriting the request from varnish to query the backend.

Here is what varnish receive ==> 


http://cmsfoqua:8180/vgnExtTemplating/stresource?SecurityKey=lVPNsLcf&SiteName=axabanque&ServiceName=DetailLAB&Language=fr&ResourceName=Entete&TTL=3600&CIBLAGE=

And I would like varnish to rewrite the url like this (http://cmsfoqua/xml/DetailLABEntete.xml) , then call the backend.

Here is my rule in vcl_recv subroutine:

set req.url = regsub(req.url, "^/vgnExtTemplating/stresource.([&?]SecurityKey=([a-zA-Z0-9])|[&?]SiteName=([a-zA-Z])|[&?]ServiceName=([a-zA-Z])|[&?]Language=([a-zA-Z])|[&?]ResourceName=([a-zA-Z])|[&?]TTL=([0-9])|[&?]CIBLAGE=([a-zA-Z]))*", "/xml/\1\2\4.xml");

Here is actually what the backend get : /xml/.xml

Please, Help!!!!

Regards,

 
Lenny   BESSAY 

 
tel:0665454628
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20130205/5a05d989/attachment-0001.html>


More information about the varnish-misc mailing list