Forum Discussion
Multiple server with one VS
- 3 years ago
Abdou76 ,
sure you can do this ,
try this :when HTTP_REQUEST { if {[HTTP::host] eq "abc.com"}{ pool pool_1 } elseif {[HTTP::host] eq "xyz.com"}{ pool pool_2 } elseif {[HTTP::host] eq "ghl.com"}{ pool pool_3 } }Hope it works with you.
Regards - 3 years ago
Hi mohamedT
hank you for your great help
Correct answer, just be careful with iRule syntax because putting parenthesis on new lines like that can result in issues - expecially on the elseif statement. Also, pool command is pool <pool_name>
when HTTP_REQUEST {
if {[HTTP::host] eq "abc.com"}{
pool pool_1
} elseif {[HTTP::host] eq "xyz.com"}{ pool pool_2 }
}
I would suggest using LTM policies too, since it uses a configuration template that is better supported during software upgrades, and also typically performs 20% faster.
Hi CA_Valli ,
I am grateful for your advise ,
I do add this in my Notes , when implementing iRules.
Thanks alot
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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