Hi together,
it was probably a missing brace.
Here are two versions for your requirement. The second one uses "switch" and is probably faster and easier to read/maintain.
Please note the following about "switch":
- a "-" is kind of "or" comparision. In case of a match the next following decision will apply, i.e. selection of pool Talisma_MF_Webchat
- the "default" condition at the end of the list will match all unmatched validations.
when HTTP_REQUEST {
if {[string tolower [HTTP::host]] equals "mfcomb.test.com" } {
if { ([string tolower [HTTP::uri]] starts_with "/media") or
([string tolower [HTTP::uri]] starts_with "/mediaupload") or
([string tolower [HTTP::uri]] starts_with "/webchat") or
([string tolower [HTTP::uri]] starts_with "/webtrak") }{
pool Talisma_MF_Webchat
}
} elseif { [string tolower [HTTP::host]] equals "abibluat.test.com" } {
pool abibluat_pool
} elseif { [string tolower [HTTP::host]] equals "abfluat.test.com" } {
pool abfluat_pool
} elseif { [string tolower [HTTP::host]] equals "pmsuat.test.com" } {
pool PMSUAT
} elseif { [string tolower [HTTP::host]] equals "peuat.test.com" } {
pool peuat_pool
} elseif { [string tolower [HTTP::host]] equals "uat.test.com" } {
pool UAT_test
} else {
pool UAT_pool
}
}
when HTTP__REQUEST {
switch [string tolower [HTTP::host]] {
"mfcomb.test.com" {
switch -glob [string tolower [HTTP::uri]] {
"/media" -
"/mediaupload" -
"/webchat" -
"/webtrak") { pool Talisma_MF_Webchat }
}
}
"abibluat.test.com" { pool abibluat_pool }
"abfluat.test.com" { pool abfluat_pool }
"pmsuat.test.com" { pool PMSUAT }
"peuat.test.com" { pool peuat_pool }
"uat.test.com" { pool UAT_test }
default { pool UAT_pool }
}
Further I would like to ask you for two things, please:
1. Would you please mark a question as answered by tagging the response as solution.
This will help to keep track of open questions.
2. Please open a new question in case your question is dealing with another subject.
Thanks & enjoy weekend, Stephan