Forum Discussion
Silicon_84874
Nimbostratus
Jul 12, 2010Redirection to the same pool
Hi,
I'm new to iRules and do not have any formal training and I'm looking for some assistance please.
This is what I'm trying to achieve;
I have 1 pool consisting of two ...
hoolio
Cirrostratus
Jul 13, 2010You could create a separate pool for each host header value and then use HTTP classes to select the corresponding pool. Or if you wanted to use an iRule you could use something like this:
when HTTP_REQUEST {
Check the requested host header set to lower case with wildcard matching
switch -glob [string tolower [HTTP::host]] {
"a.example.com" {
pool pool_a
}
"b.example.com" {
pool pool_b
}
"c.example.com" {
pool pool_c
}
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