What happens if you remove the iRule, associate the first pool to the VIP as the default pool, and test? Do requests for the URI's matching */ENTBPM/* succeed? What about if change the pool to the other and test a URI matching */CONTENTONLY/*? If that's not working you need to check the routing and VIP configuration. Once you get the VIP working with the individual pools, you can retest with the iRule for pool selection.
If you do see problems when testing the iRule, can you add some debug logging? You're referencing variables for the pool names, but I don't see that you've set the variables with pool names. Also, you probably just need to check the path for the request (not the host and URI) for the /ENTBPM/ and /CONTENTONLY/ strings. Here is an example with logging.
when HTTP_REQUEST {
set entbpm_pool "my_pool_name_1"
set contentonly_pool "my_pool_name_2"
set default_pool "my_pool_name_3"
log local0. "[IP::client_addr]:[TCP::client_port]: New request to [IP::local_addr]:[TCP::local_port], [HTTP::host][HTTP::uri]"
Check the requested path
switch -glob [HTTP::path] {
"*/ENTBPM/*" {
log local0. "[IP::client_addr]:[TCP::client_port]: Matched $entbpm_pool pool"
pool $entbpm_pool
}
"*/CONTENTONLY/*" {
log local0. "[IP::client_addr]:[TCP::client_port]: Matched $contentonly_pool pool"
pool $contentonly_pool
}
default {
log local0. "[IP::client_addr]:[TCP::client_port]: Matched default pool"
pool $default_pool
}
}
}
Aaron