Forum Discussion

somja's avatar
somja
Icon for Nimbostratus rankNimbostratus
Aug 21, 2019

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?