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 {
...
Vernon_97235
Oct 18, 2015Historic F5 Account
Yes. 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"
}
}
Allanwynn_16283
Nimbostratus
Oct 18, 2015hi? can you help me with my question?
My question is, is there an irule that i can use with this irule(odd-even source ip based) that will rewrite the location url into https://my.url.com also?
i.e. NOW: if user's IP is 10.10.10.20 and access https://my.url.com he will be redirected to https://our.url2.com, and he will see that url (https://our.url2.com) on his browser and if user's IP is 10.10.10.21 and access https://my.url.com he will be redirected to https://our.url1.com, and he will see that url (https://our.url1.com) on his browser
WHAT WE WANT: if user's IP is 10.10.10.20 and access https://my.url.com he will be redirected to https://our.url2.com, and but he will see on his url is https://my.url.com on his browser and if user's IP is 10.10.10.21 and access https://my.url.com he will be redirected to https://our.url1.com, and but he will see on his url is https://my.url.com on his 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