<?php
if($_SERVER['HTTP_HOST'] != 'www.kmprykyy.com')
{
header('HTTP/1.1 301 Moved Permanently');
header('Location: http://www.kmprykyy.com'.$_SERVER['REQUEST_URI']);
}
PHP实现http 301跳转
点赞
收藏
PHP实现http 301跳转
<?php
if($_SERVER['HTTP_HOST'] != 'www.kmprykyy.com')
{
header('HTTP/1.1 301 Moved Permanently');
header('Location: http://www.kmprykyy.com'.$_SERVER['REQUEST_URI']);
}