Having issue with multiple if statements for irule
What I am trying to do is have / and specific data group list URIs going to pool B and the rest of the traffic going to pool A. Issue is that when a URI contains part of an entry in the data group list it uses that pool (example /test is in the dgl and if /test/documents is requested it goes to the dgl not pool A). So I tried the following irule but it is not working.
when HTTP_REQUEST { if { ( [HTTP::uri] equals "/A/documents" ) or ( [HTTP::uri] equals "/B/documents" ) or ( [HTTP::uri] equals "/A/document-library" ) or ( [HTTP::uri] equals "/B/document-library" ) or ( [HTTP::uri] equals "/A/video" )} { pool pool_default.domain.com } if { ( [HTTP::uri] equals "/" ) or ( [class match [string tolower [HTTP::uri]] starts_with dgl_aem.domain.com] ) } { pool pool_alternate.domain.com } else { pool pool_default.domain.com } }