<?php header("HTTP/1.1 301 Moved Permanently"); header("Location: http://www.other-website.com"); ?>从old.php将用户重定向到new.php在同一个域。编辑old.php并把下面的代码放在文件顶部
<?php header("HTTP/1.1 301 Moved Permanently"); header("Location: http://mydomain.com/new.php"); ?>