I need help creating a regular expression to find the subdomain in the
$HTTP_HOST variable.
The domain is always in this form:
or
uk.domain.com
or
domain.com
there is no such thing as a
sub.sub.sub.dom ain.com
(not in my case, at least)
So, I need to find out if the subdomain is empty, "www" or "uk".
Can someone help me?
Leif
$HTTP_HOST variable.
The domain is always in this form:
or
uk.domain.com
or
domain.com
there is no such thing as a
sub.sub.sub.dom ain.com
(not in my case, at least)
So, I need to find out if the subdomain is empty, "www" or "uk".
Can someone help me?
Leif
Comment