Forum Discussion
The_Bhattman
Mar 11, 2010Nimbostratus
Hi AH,
Here is the script reworked based on my understand of what you would like to do
How it works is that if anyone NOT matching Datagroup ALLOW-DURING-MAINTENANCE is sent to the maintenance page. All others presumably in the ALLOW-DURING-MAINTENANCE datagroup will be sent to the either the APACHE-SERVER-POOL or WEBLOGIC-POOL based the URI.
Does this sound more like what you wanted?
when HTTP_REQUEST {
Check if client IP is in the datagroup
if {!([matchclass [IP::client_addr] equals $::ALLOW-DURING-MAINTENANCE])}{
HTTP::redirect "http://www.mainsite.com/maintenance/sched-maintenance.htm"
} else {
set stime 10
switch -glob [string tolower [HTTP::uri]] {
"/app01*" -
"/app02*" -
"/app03*" -
"/app004*" -
"/app05*" { pool APACHE-SERVER-POOL }
default { pool WEBLOGIC-POOL }
}
}
}
Bhattman