Forum Discussion
Kevin_Stewart
Sep 26, 2018Employee
You're going to three separate pools, which could each independently be down. Maybe something like this makes more sense?
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/uriX/uriZ" -
"/uriX/uriZ/" -
"/" {
HTTP::respond 301 "Location" "https://www.websitename.com/uri/uri/uri"
}
"/abc.def*" {
if { [active_membes poolnameA_pool] > 0 } {
pool poolnameA_pool
} else {
HTTP::respond 200 content [ifile get "poolname_MaintenancePage_ifile"] noserver "Content-Type" "text/html" "Cache-Control" "no-cache, must-revalidate"
return
}
}
"*/xyz/*" {
if { [active_membes poolnameB_pool] > 0 } {
pool poolnameB_pool
} else {
HTTP::respond 200 content [ifile get "poolname_MaintenancePage_ifile"] noserver "Content-Type" "text/html" "Cache-Control" "no-cache, must-revalidate"
return
}
}
default {
if { [active_membes poolnameDefault_pool] > 0 } {
pool poolnameDefault_pool
} else {
HTTP::respond 200 content [ifile get "poolname_MaintenancePage_ifile"] noserver "Content-Type" "text/html" "Cache-Control" "no-cache, must-revalidate"
return
}
}
}
HTTP::header insert HttpsIndicatorHeader True
}