Forum Discussion
Sylvain_85827
Jul 03, 2013Cirrus
Thanks Kevin for your help and your tips. I really appreciate.
In fact I don't really need to know the number of the node, I can directly use the IP address.
Basically I want to rewrite the Host header depending on the node selected for load-balancing the traffic.
What do you think of this iRule:
when HTTP_REQUEST_SEND {
Need to force the host header replacement and HTTP:: commands into the clientside context
as the HTTP_REQUEST_SEND event is in the serverside context
clientside {
switch -glob [LB::server addr] {
"1.1.1.1" {
HTTP::header replace Host "newHostHeader01"
}
"1.1.1.2" {
HTTP::header replace Host "newHostHeader02"
}
etc...
}
}
}
Do you think a more proper way to do that?
Thanks in advance for your valuable feedback.