if (substr_count($_SERVER['HTTP_HOST'], 'www')) { $site_url = str_replace('www.','',$_SERVER['HTTP_HOST']); header("Location:".$site_url); exit; }