Hi RoyalM,
I would structure and format the code in this way...
when HTTP_REQUEST {
if {[class match [string tolower [HTTP::header value "Via"]] contains CDN_HEADERS] } then {
return
} elseif {[class match [IP::client_addr] equals Whitelist] } then {
return
} else {
switch -exact -- [whereis [IP::client_addr] country] "NL" {
pool NL-splash
} "RU" {
pool RU-splash
} "UK" {
HTTP::respond 301 noserver Location "https://www.google.com"
} "US" {
HTTP::respond 301 noserver Location "https://www.google.com"
} default {
return
}
}
}
Give it a try, maybe its already resolving your issues?
Cheers, Kai