Forum Discussion
Redirect multiple CNAME to a pool
Should be something like this?
when HTTP_REQUEST {
if { [HTTP::host] eq "cname1.site.com" "cname2.site.com} {
pool pool_name
}
}
- Simon_BlakelyAug 10, 2020Employee
It will be easier to manage if you create a datagroup (type string) to hold the CNAMES, and match against the datagroup.
when HTTP_REQUEST { # cname_dg is a datagroup of type string containing matching cnames if { [HTTP::host] equals cname_dg} { pool pool_name } }
- lorenzeAug 10, 2020Altocumulus
,
Thanks for pointing that out. I haven't really think of it or if that is even possible. Quick question though, Does the string and value on creating DG needs to match or just adding the cnames as the string would be all good?
Thanks again , Really appreciate it
- Simon_BlakelyAug 10, 2020Employee
You just need the cname as the String: , and leave the value blank.
Oh - and you can match against a datagroup in a local traffic policy as well
Recent Discussions
Related Content
* 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