Forum Discussion
AllanUK_202329
Nimbostratus
Jan 12, 2017iRule for subdomain datagroup matching
Hi,
I have been trying to find a solution to my requirement below,
We have subdomains like subdomain.domain.com and we want to perform a match on the domain part in a data group to return a pool ...
Jan 12, 2017
Hi and welcome to the forum!
I understood the question a bit differently and thought you wanted to choose pool based on "domain.com" if the request was for ";.
This should do it in that case. Haven't tested it for syntax though.
when HTTP_REQUEST {
set [domain [getfield [HTTP::host] ":" 1] 2]
if { [class match $domain eq yourdatagrouplist] }{
pool [class lookup $domain yourdatagrouplist]
} else {
pool yourdefaultpool
}
}
As for the SSL profile you should probably look into SNI:
https://devcentral.f5.com/articles/ssl-profiles-part-7-server-name-indication
Hope that helped.
/Patrik
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