asp,php,.net使用301重定向方法

来源:51windows.Net 时间:2007-09-26 14:05:00 

使用 Response.Redirect "aspxhome.asp" 转向方法的HTTP Status Code 为302

下面是301转向的代码:

asp:

Response.Status="301 Moved Permanently" 
Response.AddHeader "Location", "https://www.aspxhome.com/"
Response.End


Php:

header("HTTP/1.1 301 Moved Permanently");
header("Location:https://www.aspxhome.com/);
exit();


ASP.NET:

<script runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
 Response.Status = "301 Moved Permanently";
 Response.AddHeader("Location","https://www.aspxhome.com/);
}
</script>


海娃整理

标签:301,重定向
0
投稿

猜你喜欢

  • DIV+CSS常见错误及解决方法

    2008-04-25 22:46:00
  • 带你快速了解SQL窗口函数

    2024-01-27 19:11:38
  • Tensorflow加载与预处理数据详解实现方法

    2023-01-29 02:57:09
  • Python实现上传Minio和阿里Oss文件

    2023-10-29 11:04:07
  • Python ini配置文件示例详解

    2023-08-24 09:07:36
  • 多个域名后缀同时查询的域名查询系统代码

    2008-05-20 11:53:00
  • python 列表,集合和字典的增删改查

    2021-06-20 04:31:37
  • Matlab中plot基本用法的具体使用

    2022-08-14 10:28:24
  • pytorch collate_fn的基础与应用教程

    2021-06-03 02:55:57
  • SQLServer 清理日志的实现

    2024-01-27 12:41:21
  • 详解如何使用Pytorch进行多卡训练

    2023-08-02 06:43:29
  • python3图片转换二进制存入mysql

    2023-05-18 07:06:50
  • js 将json字符串转换为json对象的方法解析

    2023-07-22 21:41:49
  • Python基于pillow库实现生成图片水印

    2021-08-01 10:45:38
  • python DataFrame转dict字典过程详解

    2022-08-16 20:59:08
  • python 还原梯度下降算法实现一维线性回归

    2023-10-09 21:53:42
  • Python 页面解析Beautiful Soup库的使用方法

    2022-02-26 07:57:15
  • Python 绘制可视化折线图

    2023-08-25 18:12:14
  • IE window对象介绍

    2008-05-21 18:47:00
  • Python对列表的操作知识点详解

    2022-05-08 09:06:39
  • asp之家 网络编程 m.aspxhome.com