Need an Irule for below request

Hello,

Created the VIP on F5 and two below nodes attached vip call for the moment - http://uat1-jboss7.digital-solutions.kamlesh.com:8080/ http://uat2-jboss7.digital-solutions.kamlesh.com:8080/

pool member need to be call with context here-

http://uat1-jboss7.digital-solutions.kamlesh.com:8080/rest2ldap http://uat2-jboss7.digital-solutions.kamlesh.com:8080/rest2ldap

Need an Irule for the same Please help and suggest .Thanks in advance.

Regards kamlesh Y

Hi Kamlesh,

to add a leading subfolder for every incomming HTTP request, you may use the iRule below as a starting point…

when HTTP_REQUEST {

    HTTP::uri "/rest2ldap[HTTP::uri]"

}

Note: Keep in mind, that this iRule would change request fortobut alsotoor evento. If you require just some URIs to become changed, then you have to use additionalorconditions to filter the URIs where the translation is required.

/
/rest2ldap/
/something
/rest2ldap/something
/somethingother
/rest2ldap/somethingother
[if]
[switch]
when HTTP_REQUEST {
    if { ( [HTTP::uri] equals "/" ) or ([string tolower [HTTP::uri]] starts_with "/something") } then {
         Change the URI
        HTTP::uri "/rest2ldap[HTTP::uri]"
    } else {
         Do not change the URI...
    }
}

Cheers, Kai