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']);
}

你可能感兴趣的:(PHP实现http 301跳转)