farache_28983
Sep 05, 2012Nimbostratus
Rewrite to URL and strip part of the URI
Hi guys,
Basically i need to do this.. been testing different scenarios with HTTP_request and HTTP_RESPONSE but no luck.
- When a url comes through from this domain, we would like to rewrite as follows:
- Persona-api.domainname.com/v1/abc/…. - Rewrite to 172.17.2.7/abc/…
- Here we remove the /v1 in the path
- Persona-api.domainname.com/v2/xyz/…. – rewrite to 172.17.19.19/xyz/…
- Here we remove the /v2 in the path
- Persona-api.domainname.com/v1/abc/…. - Rewrite to 172.17.2.7/abc/…
Basically the only part of the URL that I know is persona-api.domainname.com/v1 or persona-api.domainname.com/v2
the rest after /V1 or /V2 will be dynamic and will change anytime..
How can I remove /V1 or /V2 and append the rest of the requested URL?
Any ideas are welcome..
thanks