$site = "pupsiq.com"; if(strpos($_SERVER['HTTP_HOST'], "www.") !== 0){ header("Location: http://www." . $site . $_SERVER['REQUEST_URI']); }