Forum Discussion
hooleylist
Nov 30, 2011Cirrostratus
Hi Youe,
Great work. That's a nice, simple iRule for the scenario.
The only improvement I see is to change class match -element to class match -value to retrieve just the pool name from the datagroup. You can then check for $zone_pool ne "" before trying to assign the pool.
Another slight change you could make is to check that the host isn't null or an IP before doing the class match:
Check if the host header is not null and not an IP address
if {[string match {*[a-zA-Z]*} [HTTP::host]]}{
Aaron