Forum Discussion
Michael_Yates
Sep 14, 2011Nimbostratus
Hi ngaze,
I am making a few assumptions, so correct me if I am wrong. I am assuming that your URI starts with /home or /web-services for the comparisons that you are looking to qualify for.
I am also assuming that you are on v10.x.x because of the way that you listed your class ("allowed_networks") in your iRule, so I changed the "matchclass" to "class match". If you are still on on v9.x.x you will need to switch it back to "matchclass".
Try this and see if it works for you.
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/home*" { pool server_pool }
"/web-services*" {
if { [class match [IP::client_addr] equals allowed_networks] }{
pool server_pool
}
}
default {
reject
}
}
}