Hi Ray,
First you need to ensure that what the client is requesting exists on the servers in that pool. The client won't receive any notification that anything different is going on in the background like it would using HTTP::redirect. If you set that pool to be the default pool on some VIP, does it behave as expected? Think of that as trying to eliminate the iRule as the source of your problem. In addition, you should make sure your VIP has a default pool defined.
You should look into using a case/switch statement as it can really make things quite a bit easier to deal with.
An example would look like:
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::host]] { I add glob to make matching a bit more loose, if you want exact matching then you can omit it.
"url1" - use the dash to indicate multiple arguments
"url2" -
"url3 {
pool YOURPOOL
}
"other url" {
pool OTHERPOOL
}
default {
define a default action, ie: a fallback pool
}
}
See the iRules 101 page for Switches at iRules 101 part 4: Switch