Forum Discussion
Kevin_Stewart
Sep 12, 2013Employee
Thanks, can I make it easier so if there is a match from the list then go to pool1 otherwise go to pool2, then I will just put the first half in the list without specifying a pool.
Certainly. Create the data group with the first set of domains, then modify the iRule accordingly:
when HTTP_REQUEST {
if { [class match [string tolower [HTTP::host]] equals my_domain_dg] } {
pool pool1
} else {
pool pool2
}
}
In this version, your data group entries don't have to have a corresponding pool or node value - just enter the domain name as the key and leave the value blank (we're not going to use it). Then create TWO pools: pool1 for domains that are in the data group, and pool2 for everything else.