Forum Discussion
Galahat_287504
Nimbostratus
Aug 25, 2016Rewrite incoming PATH
Hi All,
I want to access my app through F5 iRule, let say my url my.example/app1 and i want to access my.example/app1/ping.
When the request coming, how to rewrite /app1/ping become /ping ?...
Vijay_E
Cirrus
Aug 25, 2016You can do a redirect:
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] contains "/app1/" } {
HTTP::uri [string map {"/app1/" "/"} [HTTP::uri]]
HTTP::respond 301 Location "http://[HTTP::host][HTTP::uri]"
}
}
You can remove the "/app1/" and send the request to the server:
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] contains "/app1/" } {
HTTP::uri [string map {"/app1/" "/"} [HTTP::uri]]
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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