使用 Response.Redirect "51windows.asp" 转向方法的HTTP Status Code 为302
下面是301转向的代码:
asp:
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", "http://www.51windows.net/"
Response.End
Php:
header("HTTP/1.1 301 Moved Permanently");
header("Location:http://www.51windows.net/);
exit();
ASP.NET:
<script runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
Response.Status = "301 Moved Permanently";
Response.AddHeader("Location","http://www.51windows.net/);
}
</script>