成全电影大全在线观看国语版免费,成全电影大全在线观看国语高清,成全在线电影在线观看,成全动漫影视大全在线观看国语,成全在线观看高清完整版免费动漫,成全电影大全免费观看完整版国语,三人成全免费观看电视剧高清一共多少集啊,成全电影大全在线播放,成全电影大全在线观看高清版,成全影视在线观看第6季,成全电影大全在线观看高清免费播放电视剧,成全在线观看免费完整版第6,成全电影大全在线观看

PHP ASP .NET Apache html python 網(wǎng)站301重定向

什么是301重定向?

301重定向(或叫301跳轉(zhuǎn))是當(dāng)用戶或搜索引擎向網(wǎng)站服務(wù)器發(fā)出瀏覽請求時,服務(wù)器返回的HTTP數(shù)據(jù)流中頭信息(header)中的狀態(tài)碼的一種,表示本網(wǎng)頁永久性轉(zhuǎn)移到另一個地址。

使用 301 重定向?qū)⒛瓉砭W(wǎng)站上的所有網(wǎng)頁永久重定向至新網(wǎng)站。這可以告訴搜索引擎和用戶您的網(wǎng)站已永久遷移。是符合搜索引擎友好的,目前最安全的網(wǎng)址域名更換。

以下提供URL重定向代碼,可以根據(jù)實(shí)際情況,進(jìn)行應(yīng)用

ASP.NET

<%@ Page Language=”C#” %>
<script runat=”server”>
protected void Page_Load(object sender, EventArgs e)
{
HttpContext.Current.Response.StatusCode = 301;
HttpContext.Current.Response.Status = “301 Moved Permanently”;
HttpContext.Current.Response.AddHeader(“Location”, http://fenghexin.com);
}
</script>

Apache

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://fenghexin.com$1 [R=301,L]

javascript

<script language=”javascript”>
top.location=’http://fenghexin.com’;
</script>

html

<meta http-equiv=”refresh” content=”0; url=http://fenghexin.com”>

asp

<%
Response.Status=”301 Moved Permanently”
Response.AddHeader “Location”,”http://fenghexin.com”
Response.End
%>

php

<?php
header(“HTTP/1.1 301 Moved Permanently”);
header(“Location: http://fenghexin.com”);
exit();
?>

python

from django import http
def view(request):
return http.HttpResponseRedirect(‘http://fenghexin.com’)

相關(guān)新聞