//hook_init(); function ex_init(){ //删除 url 前面的 www if (substr($_SERVER['HTTP_HOST'],0,3) == 'www'){ header('Location:http://'.substr($_SERVER['HTTP_HOST'], 4).$_SERVER['REQUEST_URI'], true, 301); } }
//hook_init(); function ex_init(){ //删除 url 前面的 www if (substr($_SERVER['HTTP_HOST'],0,3) == 'www'){ header('Location:http://'.substr($_SERVER['HTTP_HOST'], 4).$_SERVER['REQUEST_URI'], true, 301); } }