Host based redirects with class-lists
In URI based redirect with class-lists I referred to new features in 2.7.0. The same can be done with Hostnames.
The class-list:
The aFleX:
The class-list:
class-list cl-redirects string
str a10networks.com https://a10networks.com
str w3.a10networks.com https://a10networks.com
str w3.customer1.tld http://shared.sample.tld/customer1
str w3.customer2.tld http://shared.sample.tld/customer2
!
The aFleX:
when HTTP_REQUEST {
set HOST [HTTP::host]
set redirect_url [CLASS::match $HOST equals cl-redirects value]
if { $redirect_url != ""} {
HTTP::redirect $redirect_url
}
}
0
Comments