PHP的301重定向代码
更推荐这种方法,因为它可以把bwlot.com原来所有的url都跳转转到一个新的域名上
<?php
$the_host = $_SERVER['HTTP_HOST'];
$request_uri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '';
if($the_host == 'bwlot.com') {
header('HTTP/1.1 301 Moved Permanently');
header('Location: https://bwlot.com'.$request_uri);//
}
?>
https://bwlot.com