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...
P_K
Altostratus
Jul 19, 2017Try this.. should work
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] ends_with "/api/" }
{
HTTP::redirect http://[HTTP::host][HTTP::uri]v1/
}
}
If your VIP is on port 443, change HTTP::redirect https://[HTTP::host][HTTP::uri]v1/
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
