Forum Discussion
Shawn_Parkerso1
Apr 18, 2018Nimbostratus
URL Rewrite using local traffic policy
I am looking to use a local traffic policy instead of a iRule (if possible). We want to rewrite the URI portion of incoming requests as they are presented to the inside web host.
Outside: http...
crodriguez
Apr 19, 2018Ret. Employee
So long as "/PROD/" does not appear anywhere else in the URI, you should be able to use something like below. This assumes the URI is not case sensitive, and that /PROD/ is the same as /prod/ or /Prod/.
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] contains "/prod/" } {
HTTP::uri [string map { "/prod/" "/" } [HTTP::uri]]
}
}
I ran a modest test on my BIG-IP system but await results in your environment.
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