Christopher_Boo
Jun 05, 2012Cirrostratus
Need help combining 2 irules
I'm not much of a scripter but I usually figure it out of I stare at it long enough. I'm trying to combine the 2 irules below. I'd like to insert irule 2 at the end of irule 1. The idea is to allow anyone on the network to hit the specified URIs and be directed to the rec.utt.pool, but to only allow internal users (api.network.list class) to go to the api.utt.pool and either drop or provide an http access denied message to everyone else. I'd appreciate any help.
Thanks,
Chris
Irule 1
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/pss-alerts*" -
"/pss-forms*" -
"/pss-reports*" -
"/pss-messaging*" {
pool rec.utt.pool
}
default {
pool api.utt.pool
}
}
}
Irule 2
when CLIENT_ACCEPTED {
if { [class match [IP::client_addr] equals api.network.list] } {
pool api.utt.pool
} else {
drop
}