Forum Discussion
Kevin_Stewart
Aug 28, 2013Employee
There's a few ways to do this, but how about this:
Data group (example: my_uri_dg):
"/marines" := "PoolA_redirect"
"/mrt" := "PoolA_redirect"
"/mrtnet" := "PoolA_redirect"
"/mrtsurvey" := "PoolA_redirect"
"/navy" := "PoolA_redirect"
"/protected" := "PoolA_redirect"
"/rto" := "PoolA_redirect"
"/saat" := "PoolA_redirect"
"/saat2" := "PoolA_redirect"
"/sftfamily" := "PoolA_redirect"
"/sftservice" := "PoolA_redirect"
"/survey" := "PoolA_redirect"
"/images" := "PoolA_redirect"
"/resources" := "PoolA_redirect"
"/mrtemail" := "PoolA_redirect"
"/scripts" := "PoolA_redirect"
"/styles" := "PoolA_redirect"
"/trainingcenters" := "PoolA_redirect"
"/ultimateme" := "PoolA_redirect"
"/programs" := "PoolB_redirect"
And the iRule:
when HTTP_REQUEST {
if { [class match [string tolower [HTTP::uri]] starts_with my_uri_dg] } {
pool [class match -value [string tolower [HTTP::uri]] starts_with my_uri_dg]
} else {
pool PoolC_redirect
}
}