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-selection] error: line 5: [undefined procedure: elseif] [elseif]
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::host]] {
if { [HTTP::host] starts_with "abc" } {
pool ss-devsp3-pool
} elseif { [HTTP::host] starts_with "def" } {
pool ss-devsp3-pool-81
} elseif { [HTTP::host] starts_with "ghi" } {
pool ss-devsp3-pool-82
} }
}