Forum Discussion
DM_5174
Feb 14, 2012Nimbostratus
Hi Nitass,
Here is my code...Does this look good?
when HTTP_REQUEST {
Check if client host IP is in the datagroup or not, if not then redirect
if {not ([IP::addr [IP::client_addr] equals 199.200.99.150]) and \
not ([IP::addr [IP::client_addr] equals 199.200.99.151])} {
HTTP::redirect "http://www.mysite.com/maintenance/maintenance.htm"
} else {
set stime 10
switch -glob [string tolower [HTTP::uri]] {
"/app1*" -
"/app2*" -
"/app3*" -
"/app4*" -
"/app5*" -
"/app6*" -
"/app7*" -
"/app8*" -
"/app9*"
{ pool WEB_POOL1 }
default { pool WEB_POOL2 }
}
}
}
-DM