Forum Discussion
Deepak_Nair
Cirrus
Feb 18, 2021Need a HELP with my IRULE
Hi Folks , I am working on one requirement and need a little help with my Irule . When CLIENT makes a req with https://example.com/abcserver and hit to F5 , the F5 should send a response...
jaikumar_f5
Noctilucent
Feb 20, 2021I see you are using starts_with, which will match all time. Try equals.
if {([string tolower [HTTP::host]] equals "example.com") && [HTTP::uri] equals "/abcserver" } {
HTTP::redirect "https://example.com/abcserver/rest/services"
}
if {([string tolower [HTTP::host]] equals "example.com") && [HTTP::uri] equals "/abcserver/rest/services" } {
HTTP::uri [string map {"/abcserver" "/xyz"} [HTTP::uri]]
node 1.1.1.1 6443
}So once its redirected, the request is going to come in with /abcserver/rest/services, then on the second condition you can make that check & modify your GET request.
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