如何做301重定向,把老域名权重传递到新域名?

2025-09-26 10:46:59

1、Internet信息服务管理器 -> 虚拟目录 -> 重定向到URL,输入需要转向的目标URL,并选择“资源的永久重定向”。

1、<%@ Language=VBScript %>

<%

Response.Status=”301 Moved Permanently”

Response.AddHeader “Location”, “域名/html/301/”

%>

1、<script runat=”server”>

private void Page_Load(object sender, System.EventArgs e)

{

Response.Status = “301 Moved Permanently”;

Response.AddHeader(”Location”,”域名/html/301/“);

}

</script>

1、header(”HTTP/1.1 301 Moved Permanently”);

header(”Location: 域名/html/301/”);

exit();

1、Options +FollowSymLinks

RewriteEngine on

RewriteRule ^news-(.+).html$ news.php?id=$1

将news.php?id=123这样的地址转向到news-123.html

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢