Forum Discussion
kunjan_118660
Oct 25, 2014Cumulonimbus
I need if the top IF statements match to exit the irule and use the defined pool.
Are your referring to this:
if { ( [HTTP::uri] equals "/" ) or ( [class match [string tolower [HTTP::uri]] starts_with dgl_aem.domain.com] ) } {
What is the string list in dgl_aem.domain.com expected to match here?
- JeffMOct 25, 2014NimbostratusOriginally I had the following irule: when HTTP_REQUEST { if { ( [HTTP::uri] equals "/" ) or ( [class match [string tolower [HTTP::uri]] starts_with dgl_aem.domain.com] ) } { pool pool_alternate.com } else { pool pool_default.domain.com } The data group list (dgl_aem.domain.com) had all the URIs for the alternate pool. The problem that has come up is that for example /legal-documents/ is defined in the data group list to (as it should) to point to the alternate pool but the URI /legal-documents/insurance needs to point to the default pool. So to allow these few exception URIs to hit the default pool before the data group was read I thought I could do this iRule: when HTTP_REQUEST { if { ( [HTTP::uri] equals "/A/documents" ) or ( [HTTP::uri] equals "/B/documents" ) or ( [HTTP::uri] equals "/C/documents" ) or ( [HTTP::uri] equals "/D/documents" ) or ( [HTTP::uri] equals "/E/documents" )} { 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.com } else { pool pool_default.domain.com }