Forum Discussion
kamlyada_209668
Nimbostratus
Jul 29, 2016Need 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...
Kai_Wilke
MVP
Jul 29, 2016Hi 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 for
to /
but also /rest2ldap/
to /something
or even /rest2ldap/something
to /somethingother
. If you require just some URIs to become changed, then you have to use additional /rest2ldap/somethingother
or [if]
conditions to filter the URIs where the translation is required.[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
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