Forum Discussion
Allanwynn_16283
Nimbostratus
Oct 18, 2015irule for rewrite
Hi Everyone,
So we have a setup where the user access the VS of F5 "https://my.url.com".
Our current setup is using client source IP based for load balancing (odd-even):
when HTTP_REQUEST {
...
VernonWells
Employee
Oct 18, 2015Yes. Rewrite the HTTP Host header as it is proxied from client-side request to server-side request:
when HTTP_REQUEST {
if { [getfield [IP::client_addr] . 4] & 0x01 == 1 } {
HTTP::host "our.url1.com"
}
else {
HTTP::host "our.url2.com"
}
}
VernonWells
Employee
Oct 18, 2015I apologize if I missed something you wanted (e.g., @stanislas's pool selection) but I do believe that this accomplishes what you request. I altered the mechanism for octet extraction and odd/even selection in order to make it more compact and slightly faster. More to the point, server virtual host selection is generally a function of the submitted HTTP Host header value. Changing that in HTTP_REQUEST will change it between the BIG-IP and the Pool Member only. Thus, the client will not "know" that a change was made at all (and as such, the originally selected URL will remain unaltered in the user-agent/browser).
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