Forum Discussion
AndreyS_294380
Jan 23, 2017Nimbostratus
iRule pool selection based on [HTTP::host]
Hello,
I'm trying to distribute traffic that comes to VS among some pools based on ]HTTP::host]. Here is the iRule but unfortunately it doesn't work:
when HTTP_REQUEST {
set hostname [string t...
Stanislas_Piro2
Jan 23, 2017Cumulonimbus
Hi,
you can use local traffic policies instead of irule to do that.
if you want to use irule, use this one:
when HTTP_REQUEST {
switch -- [string tolower [HTTP::host]] {
"site1.com" {
pool pool1
"site2.com" {
pool pool2
"site3.com" {
pool pool3
}
log local0. "The selected pool is : [LB::server pool]"
}
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