PHP:
在 index.php 的最顶部加入:
<?php
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.jbxue.com/");
exit();
?>
以上就实现了一个简单的 php 301重定向,注意第一句,是关键。
asp现在用的人不多了吧,不过asp也可以实现301的重定向的。
ASP:
在 index.asp 或 default.asp 的最顶部加入:
<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location","http://www.jbxue.com/"
Response.End
%>
在 index.php 的最顶部加入:
<?php
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.jbxue.com/");
exit();
?>
以上就实现了一个简单的 php 301重定向,注意第一句,是关键。
asp现在用的人不多了吧,不过asp也可以实现301的重定向的。
ASP:
在 index.asp 或 default.asp 的最顶部加入:
<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location","http://www.jbxue.com/"
Response.End
%>