irule-not-matching-uri-as-expected
I have the following iRule setup which allows me to request a pool based on uri.
when RULE_INIT { set req_count 0 after 60000 -periodic { set req_count 0 } }
when HTTP_REQUEST { if {[HTTP::uri] matches_regex "^/data/main.js\?id=100\&."} { incr ::req_count if { $::req_count > 40000 } { HTTP::respond 503 Retry-After 3 } use pool siteA_http_pool } elseif {[HTTP::uri] matches_regex "^/data/main.js\?id=200\&."} { use pool siteB_http_pool } elseif {[HTTP::uri] matches_regex "^/data/main.js\?id=300\&.*"} { use pool siteC_http_pool } else { use pool siteD_http_pool } }
rule to siteA_http_pool is enable.expected movement.
but
{[HTTP::uri] matches_regex "^/data/main.js\?id=200\&.*"}use pool siteB_http_pool
&
{[HTTP::uri] matches_regex "^/data/main.js\?id=300\&.*"}use pool siteC_http_pool
are not expected movement. this two rule is invalid, access to siteD_http_pool..
Where is my mistake ?