国产老熟女高潮毛片A片仙踪林,欧美喂奶吃大乳,狠狠爱无码一区二区三区,女神的私人医生动漫免费阅读

新聞建站cms系統(tǒng)、政府cms系統(tǒng)定制開(kāi)發(fā)

廣州網(wǎng)站建設(shè)公司-閱速公司

asp.net新聞發(fā)布系統(tǒng)、報(bào)紙數(shù)字報(bào)系統(tǒng)方案
/
http://m.tjsimaide.com/
廣州網(wǎng)站建設(shè)公司
您當(dāng)前位置:首頁(yè)>網(wǎng)站技術(shù)

網(wǎng)站技術(shù)

利用IIS目錄改版實(shí)現(xiàn)301轉(zhuǎn)向(全站重定向)

發(fā)布時(shí)間:2014/10/15 20:27:24  作者:Admin  閱讀:593  

廣告:

1. 利用程序跳轉(zhuǎn)

asp.net 3.1

#region 301轉(zhuǎn)向

public static void To301(string path)

{

HttpContext.Current.Response.Clear();

HttpContext.Current.Response.StatusCode = 301;

HttpContext.Current.Response.AppendHeader("location", path);

HttpContext.Current.Response.End();

}

#endregion

asp 301

<%@ Language=VBScript %>

<%

Response.Status=”301 Moved Permanently”

Response.AddHeader “Location”, “http://www.****.cn/articles/301/”

%>

php 301

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

header(”Location: http://www.****.cn/articles/301/”);

exit();

jsp 301

<%

response.setStatus(301);

response.setHeader( “Location”, “http://www.****.cn/” );

response.setHeader( “Connection”, “close” );

%>

2. 利用服務(wù)器iis實(shí)現(xiàn)轉(zhuǎn)向

iis,在要轉(zhuǎn)向的目錄(原目錄不要?jiǎng)h)右鍵,屬性-重定向到url,如:加$s$q參數(shù)

http://demo.53bk.com/shouji$S$Q  (注意:S和Q一定要大寫(xiě),不然不生效)

上面準(zhǔn)確的url和資源永久重定向打勾。

3. IIs8.5和iis 7.5 :

要建一個(gè)目錄:里面web.cofig

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpRedirect enabled="true" destination="http://zaoyuan.ysneo.com$S$Q" exactDestination="true" httpResponseStatus="Permanent" />
</system.webServer>
</configuration>

http重定向---將請(qǐng)求重定向到此目標(biāo)---http://m.tjsimaide.com$S$Q (將所有請(qǐng)求重定向到確切的目標(biāo)(而不是相對(duì)于目標(biāo))打勾,狀態(tài)代碼設(shè)為永久( 301))

4、Apache下301轉(zhuǎn)向代碼

新建.htaccess文件,輸入下列內(nèi)容(需要開(kāi)啟mod_rewrite):

1)將不帶WWW的域名轉(zhuǎn)向到帶WWW的域名下

Options +FollowSymLinks

RewriteEngine on

RewriteCond %{HTTP_HOST} ^lesishu.cn [NC]

RewriteRule ^(.*)$ http://www.****.cn/$1 [L,R=301]

2)重定向到新域名

Options +FollowSymLinks

RewriteEngine on

RewriteRule ^(.*)$ http://www.****.cn/$1 [L,R=301]

3)使用正則進(jìn)行301轉(zhuǎn)向,實(shí)現(xiàn)偽靜態(tài)

Options +FollowSymLinks

RewriteEngine on

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

將news.php?id=123這樣的地址轉(zhuǎn)向到news-123.html

5、Apache下vhosts.conf中配置301轉(zhuǎn)向

為實(shí)現(xiàn)URL規(guī)范化,SEO通常將不帶WWW的域名轉(zhuǎn)向到帶WWW域名,vhosts.conf中配置為:

<VirtualHost *:80>

ServerName www.****.cn

DocumentRoot /home/lesishu

</VirtualHost>

<VirtualHost *:80>

ServerName lesishu.cn

RedirectMatch permanent ^/(.*) http://www.****.cn/$1

</VirtualHost>

 

 

廣告:

相關(guān)文章
iis轉(zhuǎn)向
301轉(zhuǎn)向
cms新聞系統(tǒng)購(gòu)買(mǎi)咨詢(xún)
掃描關(guān)注 廣州閱速軟件科技有限公司
掃描關(guān)注 廣州閱速科技
主站蜘蛛池模板: 平湖市| 云梦县| 金昌市| 通道| 龙游县| 宿松县| 南宫市| 常德市| 邯郸市| 庐江县| 呼图壁县| 伊吾县| 黔东| 葵青区| 大竹县| 永定县| 铜陵市| 莱西市| 耒阳市| 安龙县| 黄冈市| 仪陇县| 栾城县| 永靖县| 专栏| 通辽市| 齐河县| 枞阳县| 津南区| 涟水县| 崇文区| 寿宁县| 柳河县| 沂南县| 堆龙德庆县| 道孚县| 班玛县| 南涧| 宁城县| 明水县| 乐清市|