Forum Discussion
cames1_233757
Nimbostratus
Feb 02, 2016Wildcard for Host Subdomains inside a Switch?
Is there a way to use wildcards to match any subdomain for Host entries inside a switch?
So, for example:
switch -glob [string tolower [HTTP::host]] {
"*.domain.com" { Do Something }
...
cames1_233757
Nimbostratus
Feb 02, 2016Thanks for the advice - I will give that a try!
Just to check I understand, are the "log.local0." entries just so I can check the logic is working in the LTM log?
So, if all looks good on testing, the actual rule would look something like this?
when HTTP_REQUEST {
switch -regexp [string tolower [HTTP::host]] {
.*\.a.com {
do something
}
.*\.b.com {
do something
}
default {
do something
}
}
Thanks again!
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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