<?php
$url="http://原域名".$_SERVER["REQUEST_URI"];
header("HTTP/1.1 301 Moved Permanently");
header ("Location:$url");
?>

今天实现了原域名:planboat.com跳转到新域名:iplantoo.com/blog

用php代码实现方式如上所示

Recent Posts