asp、 php实现301跳转重定向

http://www.7788sky.cn/post/asp_php_301_head_redirect.html
reference link as above

PHP:

在 index.php 的最顶部加入以下几行:

<?php
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.7788sky.cn/");
exit();
?>

ASP:

在 index.asp 或 default.asp 的最顶部加入以下几行:

<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location","http://www.7788sky.cn/"
Response.End
%>






原文地址:https://www.cnblogs.com/lexus/p/1749806.html