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 10, 2010Hi AH,
The string map is still showing CAPs Use lower case. Also I am assuming that you want the IF statement to be checked first and not process the SWITCH statement. Here is what the code looks like
when HTTP_REQUEST {
Check if client IP is in the datagroup
if {[matchclass [IP::client_addr] equals $::ALLOW-DURING-MAINTENANCE]}{
pool WEBLOGIC-SERVER-POOL
return
} else {
HTTP::redirect "http://www.mainsite.com/maintenance/sched-maintenance.htm"
return
}
set stime 10
switch -glob [string tolower [HTTP::uri]] {
"/app01*" -
"/app02*" -
"/app03*" -
"/app004*" -
"/app05*"
{
use pool APACHE-SERVER-POOL
}
}
}
I hope this helps
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