Forum Discussion
Ron_126046
Nimbostratus
Aug 28, 2013iRule configuration for sending requests to specific pool members depending on user input
Hello, I'm very new to f5. I need help on configuring an iRule. Here is what I have set up so far and is it possible to configure?
I have a Virtual server that has 3 pool members.
I have...
Kevin_Stewart
Employee
Aug 28, 2013There'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
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects