This works, but I would rather do something like in #2 example
if ( $_SERVER['SERVER_NAME'] != ' www.domain.com' )
I'm trying to wildcard * everything in front of domain.com
if ( $_SERVER['SERVER_NAME'] != ' * .domain.com' )
also if someone knows a better way to check a domain can
you please let me know?.