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...
Jan 23, 2017
Hi Andrey,
Could you include logging in your irule to see if there is a match?
when HTTP_REQUEST {
set hostname [string tolower [HTTP::host]]
if { $hostname contains "site1.com" } {
pool pool1
log local0. "pool1 selected"
} elseif { $hostname contains "site2.com" } {
pool pool2
log local0. "pool2 selected"
} elseif { $hostname contains "site3.com" } {
pool pool3
log local0. "pool3 selected"
}
}
Cheers,
Kees
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