Forum Discussion
Eric_Frankenfie
Feb 20, 2014Nimbostratus
Rewrite Portion of URI
We are moving one of our web services to a new pool of servers which will contain a different virtual directory structure. The legacy servers used a separate virtual directory for each customer, but...
Eric_Frankenfie
Mar 05, 2014Nimbostratus
I finally received the list of virtual directories from the development team.
This is what I ultimately used...
Create a new string Data Group containing the legacy URI
ltm data-group legacy_uri
records {
/custa/
/custb/
/custc/
...
iRule
when HTTP_REQUEST
if { [class match [string tolower [HTTP::uri]] starts_with legacy_uri]} {
set uri_leg [class match -name -- [string tolower [HTTP::uri]] starts_with legacy_uri]
set uri_new "/app.web/APPvirtualDirectory/"
HTTP::uri [string map [list $uri_leg $uri_new] [string tolower [HTTP::uri]]]
}
}
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects