Skip to content

url rewriting #6

@enzo1004

Description

@enzo1004

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=lVPNsLcf&SiteName=axabanque&ServiceName=(.)&Language=fr&ResourceName=(.)&TTL=(.)&CIBLAGE=(.)$", "/xml/\1\2\4.xml");

But this is not working at all,

please help!!

Regards,
Enzo

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions