Forum Discussion
James_41967
Oct 10, 2017Nimbostratus
Figured it out...had a close bracket in the wrong place!
This works:
when HTTP_REQUEST {
switch -exact -- [string tolower [HTTP::host]] "url-uat.something.com" {
if {[HTTP::path] starts_with "/patha"} {
pool patha_uat_443_pool
} elseif {[HTTP::path] starts_with "/pathb" } {
pool pathb_uat_443_pool
} elseif {[HTTP::path] starts_with "/" } {
pool uat_443_pool
} else {
drop
}
} "url-prod.something.com" {
if {[HTTP::path] starts_with "/patha"} {
pool patha_prod_443_pool
} elseif {[HTTP::path] starts_with "/" } {
pool prod_443_pool
}
} default {
drop
}
}