什么是301永久定向?
來(lái)源:昆明多彩網(wǎng)絡(luò )公司 日期:2010-10-31 閱讀: 發(fā)表評論
什么是301永久定向?將某個(gè)域名設置了301永久定向可以讓該域名轉到另外一個(gè)域名上去,同時(shí)在seo角度來(lái)看,可以將該域名的權重等也一并轉移過(guò)去,在seo領(lǐng)域廣泛使用。
在IIS中設置301永久定向:
在apache中設置301永久定向:
在A(yíng)pache 中,有個(gè)很重要的文件.htaccess,通過(guò)對它的設置,可以實(shí)現很多強大的功能,301 重定向只是其中之一。找到redirect permanent / http://m.xcqc2.com:
其他301永久定向:
1.PHP下的301重定向
<?
Header( "HTTP/1.1 301 Moved Permanently" ) ;
Header( "Location: http://m.xcqc2.com/" );
?>
2.ASP下的301重定向
<%@ Language=VBScript %>
<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location","http://m.xcqc2.com/"
%>
3.ASP .NET下的301重定向
<script runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
Response.Status = "301 Moved Permanently";
Response.AddHeader ("Location","http://m.xcqc2.com/");
}
</script>
發(fā)表評論評論列表(有 條評論)