redirect subdomain to append to uri
Hey guys, I've done a little bit with iRules but not very much. What I'm looking for is to redirect a large number of subdomains such as the following:
greg.domain.com --> www.domain.com/sites/greg
bob.domain.dom --> www.domain.com/sites/bob
I cannot seem to find a variable that accounts for the part of the host before the dot (subdomain only) so I'm afraid it will take some trickery with length type calculations. Anyone have this one already hammered out?