Forum Discussion
hooleylist
Jan 26, 2009Cirrostratus
Hi,
I think this might implement the logic you're looking for. If not, try adding logging to the iRule and then modify it as you require.
when CLIENT_ACCEPTED {
Check if the client IP is in the testips datagroup
if { [matchclass [IP::client_addr] equals $::testips] } {
Select poolA and track that we've selected a pool
pool poolA
set pool_selected 1
} else {
Continue checking the URI to select a pool
set pool_selected 0
}
}
when HTTP_REQUEST {
Check if the pool has already been selected
if {$pool_selected}{
Exit this event in this rule
return
} else {
Check the requested path
switch -glob [HTTP::path] {
"*/cf/*" -
"*/hf/*" {
pool poolB
}
"*/asweb/* {
pool poolC
}
"*/vh/* {
pool poolD
}
default {
pool poolE
}
}
}
}
Aaron