i need a if
condition, witch detects main url
, for one of my important functions.
if ($_SERVER[HTTP_HOST] == www.example.com) { echo its a root page; }
else { echo its a subdomain page; }
my site(magento)
is installed in subdomain; and im getting some pages from root via static php pages.(with htaccess
)
now.. when I try HTTP_HOST
in root pages(www.example.com/about), the value returns subdomain.example.com (!!??) - maybe because of htaccess or magento structure)
But I need 'hey its a root page' for example.
Can I use any more mothods which is not similar PHP_SELF, HTTP_HOST
etc?