Forum Discussion
Kai_Wilke
Nov 15, 2016MVP
Hi Steve,
you may try the iRule below.
The iRule uses the
HTTP_REQUEST_SEND
event to perform your required URI mapping right before the request is forwarded to a given pool member (filtered via its IP).
when HTTP_REQUEST_SEND {
if { [IP::server_addr] equals "10.10.10.10%1" } then {
clientside {
HTTP::path [string map { "hello" "goodby" } [HTTP::path]]
}
}
}
Note: Instead of using the
syntax you may also try [string map { "hello" "goodby" } [HTTP::path]]
. This syntax would be slightly more accurate and also require less CPU ressources."/goodby[string range [HTTP::path] [string length "/hello"] end]"
Cheers, Kai