choosing POOL by inspecting uri string

Hi,

i’m looking for an i-rule that choose the pool (among three) by catching in the uri string an exact word;

the HW is big-ip 5000 with BIG-IP Kernel 4.5.9 Build2

I already try this but i failed:

if (http_uri contains “word-1”) {

use pool POOL-1

}

else {

if (http_uri contains “word-2”) {

use pool POOL-2

}

else {

use pool POOL-3

}

}

I tried this on bigip 1000 version 4.6.4 and it seems working for me …

if (http_uri contains “word-1”) {

use pool pool-1

}

else if (http_uri contains “word-2”) {

use pool pool-2

}

else if (http_uri contains “word-3”) {

use pool pool-3

}

else {

discard

}

-mS