Thomas_89706
May 17, 2007Nimbostratus
In need of some iRule HELP!! URI Path stuff.
I'm trying to take the first path in the URI and direct it to a specific pool if it contains a specific string. For some reason my iRule below is directing all traffic to my catch all pool even if it meets the criteria set. Please help me I'm not sure what I'm doing wrong.
testing URL: "http://192.168.1.1/b02181/1.jsp"
jsp returns the machine name that it hits every time it goes to my pl_2 machine.
iRule:
when HTTP_REQUEST {
set CSID [string tolower [URI::path [HTTP::uri] 1 1]]
if { ([ $CSID] equals "b02181") or ( [$CSID] equals "h05527") } {
pool pl_1
} else {
pool pl_2
}
}
If my iRule has "/" in the beginning and end of the string compares it fails totally.