Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
24 lines (23 sloc) 634 Bytes
#!/usr/bin/env tclsh
#
# content-switch_host.irule
#
# This performs a simple content-switch sending VIP traffic to a pool based on
# the HTTP hostname. While short, this is very powerful as it uses a data
# group to define how to balance traffic (which is much more GUI-friendly).
#
# Data-Group Example:
# ltm data-group internal mysite_vs_csw {
# records {
# site1.example.com {
# data mysite1_pool
# }
# site2.example.com {
# data mysite2_pool
# }
# type string
# }
#
when HTTP_REQUEST {
pool [class match -value -- [string tolower [HTTP::host]] equals [virtual name]_csw]
}
You can’t perform that action at this time.