Forum Discussion
Erik_Durand_277
Nimbostratus
Aug 31, 2008uri redirect to pool
I am an iRule novice and I am trying to create an iRule that will redirect to two different pools based on URI. So far I have come up with the following with the iRule editor, but need to validate th...
hoolio
Cirrostratus
Sep 01, 2008That looks good. You can add a default case using the keyword default. If the string you're looking for is part of the path, you could replace HTTP::uri with HTTP::path. HTTP::path doesn't include the query string, so it might be more specific for your case.
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::path]] {
"*/us/*" {
pool pool_us
}
"*/uk/*" {
pool pool_uk
}
default {
pool default_pool
}
}
}
Aaron
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
