Forum Discussion
KTrout_49248
Nimbostratus
Apr 16, 2008HTTP redirect to Pools members
How can I create an iRule that will redirect a specific URL to a pool of Web servers hosting the website?
Kevin_Stewart
Employee
Apr 17, 2008The uri won't be affected by the load balancing, so the server will get the whole thing. There's two ways to catch the base "/", using this structure, that I can think of. Perhaps one of the gurus can confirm this:
1. the "default" case will catch everything not specifically defined, including the "/".
2.
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/url1*" {
pool web
}
"/url2*" {
pool web2
}
"/" {
pool web
}
default {
pool web
}
}
}I threw the "*" in after the uri in case there's additional text after it.
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