Forum Discussion
SteveVernau_132
Nimbostratus
Nov 15, 2016String replace in URI when certain node active
Replace component of path when failed over to a certain node.
I have a bit of a tricky situation here.
First I have A priority group (say 10) of two nodes load balancing, and when there are...
Kai_Wilke
MVP
Nov 15, 2016Hi 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
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