asp,asp.net和php如何添加301跳转

  asp添加301跳转响应头

Response.Status = "301 Moved Permanently"
Response.AddHeader "location", "http://yourdomain"

  asp.net添加301跳转响应头

Response.StatusCode = 301;
Response.Status = "301 Moved Permanently";
Response.AddHeader("location", "http://yourdomain"); 

  php加301跳转响应头

header('HTTP/1.1 301 Moved Permanently');//发出301转向头 
header("Location:http://yourdomain");

 


原创文章,转载请注明出处:asp,asp.net和php如何添加301跳转

评论(0)Web开发网
阅读(77)喜欢(0)不喜欢(0)Asp.Net/C#/WCF