Wouldn't it be easier if you just create 2 pools and apply the Irule.
Have a virtual created like below where it has a default pool and your sticky persistence in it,
ltm virtual testvirtual {
destination 10.10.10.10:http
ip-protocol tcp
mask 255.255.255.255
persist { cookie { } }
pool abc_pool
profiles { http { } tcp { } }
rules { pool_selection_irule }
}
On the pools have LC as the LB method.
Then put the below code in the Irule pool_selection_irule: Where abc.com is the host where you dont want the persistence to be. And xyz.com is the host where your sticky persistence would be applied automatically.
when HTTP_REQUEST {
switch [string tolower [HTTP::host]] {
"abc.com" {
pool abc_pool
persist none
}
"xyz.com" {
pool xyz_pool
}
}
}