Hi,
In this example don't set any cookie profile on your VS. You will manage this need on the irule.
And as you point in the same pool you don't need to set it in the irule just set your pool in the VS.
If you need to manage your need using Hostname
when HTTP_REQUEST {
set hostname [string tolower [HTTP::host]]
switch $hostname {
"host1.com" {
persist cookie
}
"host2.com" {
do nothing
}
}
}
If you need to manage your need using URI
when HTTP_REQUEST {
set uri [string tolower [HTTP::host]]
switch -glob $uri {
"/uri1*" {
persist cookie
}
"/uri2*" {
do nothing
}
}
}
Let me know if you need more details.
And last point, you don't asked it but it's important to keep in mind, if you have multiple pool you need a onconnect profil in order to detach the session or use LTM Policy.
Regards,