Forum Discussion
Dinesh3888
Nimbostratus
Feb 02, 2015Help on irule creation.
Hi All,
Need help on creating a irule.
when i hit a site for example 12345abc.xyz.com or 9876abc.xyz.com i need the traffic to be destined to pool_A.because we are running lot of application st...
Hannes_Rapp
Nimbostratus
Feb 02, 2015Hi,
Please try the solution below:
when CLIENT_ACCEPTED {
set POOL_DEFAULT [LB::server pool]
}
when HTTP_REQUEST {
if { [HTTP::host] contains "abc.xyz.com" }{
pool pool_A
} else {
pool $POOL_DEFAULT
}
}
Alternatively, if you have a ton of HOST values and different pools, try using:
when CLIENT_ACCEPTED {
set POOL_DEFAULT [LB::server pool]
}
when HTTP_REQUEST {
switch -glob [HTTP::host] {
"*abc.xyz.com" {
pool pool_A
}
"*def.xyz.com" {
pool pool_B
}
default {
pool $POOL_DEFAULT
}
}
}
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