irule help
We have 1 irule doing the following:
when HTTP_REQUEST { if {[string tolower [HTTP::uri]] starts_with "/aboutus/careers"} {pool A} if {[string tolower [HTTP::uri]] starts_with "/aboutus"} {pool B} if {[string tolower [HTTP::uri]] starts_with "/admin/"} {pool B member 1} if {[string tolower [HTTP::uri]] starts_with "/app_themes"}{ pool B} if {[string tolower [HTTP::uri]] starts_with "/authorized_use_policy"}{pool B} if {[string tolower [HTTP::uri]] starts_with "/cloud-overview"}{pool B} if {[string tolower [HTTP::uri]] starts_with "/cms"}{pool B} if {[string tolower [HTTP::uri]] starts_with "/customersuccesses"}{pool B} if {[string tolower [HTTP::uri]] starts_with "/device-cloud-terms-of-service"}{pool B} if {[string tolower [HTTP::uri]] starts_with "/dmca_statement"}{pool B} if {[string tolower [HTTP::uri]] starts_with "/en"}{pool B} if {[string tolower [HTTP::uri]] starts_with "/industries/"}{pool B} if {[string tolower [HTTP::uri]] starts_with "/legal"}{pool B} if {[string tolower [HTTP::uri]] starts_with "/new/prindex"}{pool B} if {[string tolower [HTTP::uri]] starts_with "/news"}{pool B} if {[string tolower [HTTP::uri]] starts_with "/pdf/*"}{[HTTP::uri] [string range [HTTP::uri] 4 end] pool C} if {[string tolower [HTTP::uri]] starts_with "/privacy"}{pool B} if {[string tolower [HTTP::uri]] starts_with "/products-overview"}{pool B} if {[string tolower [HTTP::uri]] starts_with "/scriptresource.axd"}{pool B} if {[string tolower [HTTP::uri]] starts_with "/services-overview"}{pool B} if {[string tolower [HTTP::uri]] starts_with "/webresource.axd"}{pool B} }
I would like to direct /news* to Pool B except these subsections: /news/events* /news/graphics*
/aboutus* to Pool B except these subsections /aboutus/careers /aboutus/export /aboutus/environment
Any easy way to do this? Also should I consider breaking these into separate irules giving us more flexability?