Forum Discussion
Paulius
Dec 05, 2022MVP
You might be able to do something similar to the following. If it ends up being a long list I would recommend using a data group and using that to limit your lines of code because iRules do have a line limit.
when CLIENT_ACCEPTED {
set DEFAULT_POOL [LB::server pool]
}
when HTTP_REQUEST {
set URI [string tolower [HTTP::uri]]
if { [IP::addr [IP::client_addr] eq 10.10.10.10] } {
if { $URI eq "/my/uri/path" } {
pool my_pool_for_this_uri
} elseif { $URI eq "/my/other/uri/path" }
pool my_pool_for_other_uri
else {
$DEFAULT_POOL
}
} else {
$DEFAULT_POOL
}
}