kevin_50596
Jul 10, 2008Nimbostratus
Multi-part Irule
Hello, I'm fairly new to writing iRules so I'm not sure exactly how to get this done. Any help would be greatly appreciated.
Here's some data to give you context for what I'm trying to do:
1. Any http request coming into this Virtual Server with a uri ending in "/forms" needs to be redirected to a second pool seperate from the default pool. All other http requests should go to the default pool.
2. If the second pool doesn't have any active nodes, a third pool must be selected and the http request must be redirected there.
There are two iRules I've found which I think will accomplish this, but I'm not sure how to combine them into a single iRule.
Here they are:
when HTTP_REQUEST {
if {[HTTP::host] contains "/forms"} {
pool SECOND_POOL
}
}
and
when CLIENT_ACCEPTED {
if {[active_members SECOND_POOL] < 1}{
pool THIRD_POOL
}
}
Thanks again for any help,
Kevin