Forum Discussion
nitass
Apr 18, 2014Employee
It works fine for the default pool offline but not if I try the redirected pool.
can you give an example which does not work?
by the way, did you forget to put special sequences (e.g. asterisk question mark), in the switch glob case?
iRules 101 - 04 - Switch by Joe Pruitt
https://devcentral.f5.com/articles/irules-101-04-switch.U1FXpledGCQ when HTTP_REQUEST {
set DEBUG 0
if { $DEBUG } { log local0. "Request: [HTTP::uri]" }
if { [active_members QA-HC-HTTP] < 1} {
pool QA-PH
return
}
if { $DEBUG } { log local0. "Request: [HTTP::uri]" }
switch -glob [string tolower [HTTP::uri]] {
"/portals/" -
"/js/" -
"/controls/" -
"/uk/" -
"/us/" -
"/ca/" -
"/admin/controlpanel/" -
"/webresource" -
"/scriptresource" -
"/resources/" -
"/providers/" -
"/linkclick" -
"/documentation/" -
"/desktopmodule/" -
"/config/" -
"/components/" -
"/bin/" -
"/app_themes/" -
"/app_globalResources/" -
"/app_data/" -
"/app_code/" -
"/app_browser/" -
"/dnnaadmin/" -
"/contactus/" -
"/resourcecenter/i" -
"/resourcecenter/r" -
"/resourcecenter/j" -
"/resourcecenter/e" {
if { $DEBUG } {log local0. "Sending request to QA-HC-HTTPDNN" }
if { [active_members QA-HC-HTTP] < 1} {
pool QA-PH
return
}
pool QA-HC-HTTPDNN
}
default {
pool QA-HC-HTTP
}
}
}