Forum Discussion
iRule - wildcard hostname pointing to a pool
I'm trying to point *.myapp.abc.com to a pool as I have a lot of subsites that are part of myapp.abc.com domain (i.e. xyz.myapp.abc.com, def.myapp.abc.com etc.). This is the iRule I have setup:
when HTTP_REQUEST {
switch [string tolower [HTTP::host]] {
"*.myapp.abc.com" {
pool myapp_pool
}
}
}
It doesn't work, it seems like the iRule is expects asterisk in the domain in a literal sense. Can someone point me in the right direction to get this going?
1 Reply
Hi,
Can you try this iRule?
when HTTP_REQUEST { switch -glob [string tolower [HTTP::host]] { "*.myapp.abc.com" { pool myapp_pool } } }
-glob: When matching string to the patterns, use glob-style matching (i.e. the same as implemented by the string match command).
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