Need 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 as https://example.com/abcserver/rest/services . I am able to achieve this part through re-direction ( But i am not sure if this is the correct way of doing this ) .
After that the F5 should do a GET request to backend server as below :
GET xyz or GET xyz/rest/services to the backend server
I have written this irule , re-direction is working BUT not able to GET the content .
if {([string tolower [HTTP::host]] equals "example.com") && [HTTP::uri] starts_with "/abcserver" } {
HTTP::redirect "https://example.com/abcserver/rest/services"
}
if {([string tolower [HTTP::host]] equals "example.com") && [HTTP::uri] starts_with "/abcserver" } {
HTTP::uri [string map [list "/abcserver" ""] xyz/[HTTP::uri]]
node 1.1.1.1 6443
}
I think my this irule ends up in too many re-direction . I am NOT able to understand how to achieve the GET part through irule once re-direction is DONE.
IS this the right way of doing this through re-direction .
Any help in this regard is greatly appreciated .
Thanks .