Forum Discussion
ekaleido
Nov 01, 2016Cirrus
This requires you create a datagroup tying a URL (in lower case) to the pool name you want the URL to use. Example:
www.example.com := www.example.com_pool
You also should have a default pool for cases where the URL does not match your whitelist. If you prefer you could modify the iRule to reply with a 404 or something instead of using the default pool as a fallback.
when HTTP_REQUEST {
set hostpool [class match -value [string tolower [HTTP::host]] eq url_whitelist]
if { $hostpool ne "" } {
pool $hostpool
}
}