A simple redirection irule should do the redirection :
when HTTP_REQUEST {
if { [HTTP::host] eq "webmail.abc.com" } {
HTTP::redirect "https://webmail.xyz.com[HTTP::uri]"
}
}
Then you old irule should take care of pool selection :
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/owa" } {
pool OWA_pool
}
elseif { [HTTP::uri] starts_with "/example" } {
pool Example_pool
}
#...
}
If irules are associated to the same VS, yous should make sure the redirect execute first, you have a number of options for that including checking for the hostname before pool selection, or adding priorities to your events