Forum Discussion
Kai_Wilke
Jul 29, 2016MVP
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 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