Forum Discussion
Samir_Jha_52506
Noctilucent
Done some modification in above irule. Rest every thing is correct.
when HTTP_REQUEST {
if {[string tolower[HTTP::uri]] starts_with "/abc"} {
pool pool1 }
elseif {[string tolower[HTTP::uri]] starts_with "/def"} {
pool pool2 }
}
jurgenvdmark_14
Dec 07, 2016Nimbostratus
Instead of using iRules, you can also use a ltm policy, which makes it more visible:
Name: select_pool Requires: http Controls: forwarding
Rule: forward_pool1 Condition: http-uri starts_with /abc Action: forward pool pool1 Rule: forward_pool2 Condition: http-uri starts_with /def Action: forward pool pool2
It may require some more configuring then using an iRule but instead of using TCL code, you get an clear overview what the policy does.