Forum Discussion
harton
Oct 04, 2013Nimbostratus
Irule with elseif and pool selection
Hello,
I'm trying to write an irule that routes traffic to a specific pool based on the host. I think I'm fairly close, but I can't figure out the following error:
01070151:3: Rule [test-pool-s...
Kevin_Stewart
Oct 04, 2013Employee
You're using an if/elseif structure inside a switch conditional. Try this:
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::host]] {
"abc*" {
pool ss-devsp3-pool
}
"def*" {
pool ss-devsp3-pool-81
}
"ghi*" {
pool ss-devsp3-pool-82
}
}
}
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