Forum Discussion
GioG
Nimbostratus
Jul 19, 2017URI rewrite assistance
Hello all,
I am looking to hopefully do a simple irule uri rewrite, but this one is stumping me. I have a request to rewrite a uri from: http://somehost.com/reports/api/ to http://somehost.com/rep...
GioG
Nimbostratus
Jul 20, 2017None of that worked, but the "contains" lead me downt he correct path. Here is the final irule.
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] contains "/api/" } {
set uri [string map -nocase {"/api/" "/api/v1/"} [HTTP::uri]]
HTTP::uri $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
