Forum Discussion
shlomi_133455
Nimbostratus
Apr 02, 2014iRule to Select pool by parsing
Hello,
I want to Create an Irule that will forward a request coming to Site1.website.com to pool Site1.
I want it to be generic so if i add another pool named SiteXYZ and assign another DNS record na...
John_Alam_45640
Apr 02, 2014Historic F5 Account
Name the pools site1 and site2.... siteX..
it can be as easy as this.when HTTP_REQUEST {
extract the first part of hostname.
set poolname [getfield [HTTP::header host] "." 1]
pool $poolname
}
To make sure you don't send user to an undefined pool name do this:
when HTTP_REQUEST {
extract the first part of hostname.
set poolname [getfield [HTTP::header host] "." 1]
if { [catch {pool $poolname} id ] } {
You can find this in the local traffic log from GUI or via : tail /var/log/ltm
log local0. "Pool name $poolname does not exist yet."
}
}
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