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 {
...
Stanislas_Piro2
Cumulonimbus
Oct 18, 2015Hi Allanwynn,
to display the user must request https://my.url.com.
So, the solution is to not redirect users to https://my.url1.com or https://my.url2.com but assign pool member different and rewrite host header.
when HTTP_REQUEST {
set lastoctet [lindex [split [IP::client_addr] .] 3]
if { [expr $lastoctet % 2] == 1 } {
pool pool1
HTTP::host "our.url1.com"
} else {
pool pool2
HTTP::host "our.url2.com"
}
}
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