Try putting your pool A URIs in one datagroup(
poolA_dg
); i.e. /news/events, /news/graphics,/aboutus/careers /aboutus/export, /aboutus/environment and all your pool B URIs in another datagroup(
poolB_dg
) and try this irule. It will be more efficient and should accomplish your goal.
when HTTP_REQUEST {
if {class match [string tolower [HTTP::uri]] starts_with poolA_dg}{
pool A
}
elseif {class match [string tolower [HTTP::uri]] starts_with poolB_dg}{
pool B
}
elseif {[string tolower [HTTP::uri]] starts_with "/admin/"} {
pool B member 1
}
elseif {[string tolower [HTTP::uri]] starts_with "/pdf/*"}{
[HTTP::uri] [string range [HTTP::uri] 4 end]
pool C
}
}