Forum Discussion
DM_5174
Nimbostratus
Mar 10, 2010-- HELP PUTTING MULTIPLE IRULES TOGETHER
Hi All,
I was wondering if I can get the help of all the i-rule gurus here on this site.
We have 3 i-rules that i would like to put together as one, but for some reason
...
The_Bhattman
Nimbostratus
Mar 11, 2010Hi 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
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects