Forum Discussion
Same VIP - 2 URI's to different pools via irule - HELP
Hi Guys
I am trying to send traffic to 2 different pools depending on the http uri they are trying to reach, the below syntax will not take,
can someone assist
when HTTP_REQUEST {
if { [HTTP::uri] contains "test1.com"} {
pool "test-pool1"
}
}
when HTTP_REQUEST {
if { [HTTP::uri] contains "test2.com""} {
pool "test-pool2"
}
}
1 Reply
- nathe
Cirrocumulus
CarlT,
Couple of suggestions. Firstly I think you're using the wrong command (HTTP::uri), you should be using HTTP::host.
Secondly, you can tidy up the rule by using logic, rather than a duplicate HTTP_ REQUEST event. Using if/elseif instead. See this article for help.
Hope this helps.
N
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