三行代码实现301重定向
meil 发表于 - 2009-3-4 16:37:00
关键字:ASP PHP 301 重定向     来源:http://blog.livebaby.cn

用ASP/PHP实现301重定向:

ASP:
Response.Status="301 Moved Permanently"
Response.AddHeader "Location","http://www.livebaby.cn/"
Response.End

ASP.NET:

<script runat=”server”>
private void Page_Load(object sender, System.EventArgs e)
{
Response.Status = “301 Moved Permanently”;
Response.AddHeader(”Location”,”http://www.livebaby.cn/“);
}
</script>

PHP:
header("HTTP/1.1 301 Moved Permanently");
header("Location:http://www.livebaby.cn/");
exit();



本文永久地址: http://www.livebaby.cn/blog/u/meil/archives/2009/301-Redirect-20090304.html
  • 标签:ASP PHP 301 重定向 
  • 相关文章:

    评论:
      大名:
      密码:
      主页:
      标题: