水蜜桃2美国伦理|美国伦理巜交换做爰|美国伦理〈欲女春潮〉|宝贝腿开大点我添添你下边美国|美国色情巜春药2|美国少妇2做爰

  • IDC銷(xiāo)售:020-66849165/66849090/66849088
  • 云服務(wù)銷(xiāo)售:020-66849108/9091 | 客服(備案,域名,虛機(jī),郵箱):020-66849000-2

登錄 | 會(huì)員注冊(cè) | 控制面板 | 幫助中心 | 購(gòu)物車(chē) | 舉報(bào)中心

? ? 域名活動(dòng)
幫助中心FAQ
 

在網(wǎng)站運(yùn)營(yíng)的過(guò)程中,有時(shí)因一些不同的訪(fǎng)問(wèn)要求(譬如使用http://1.abc.com訪(fǎng)問(wèn)的是http://www.abc.com/1,使用http://2.abc.com訪(fǎng)問(wèn)的是http://www.abc.com/2),需對(duì)網(wǎng)站訪(fǎng)問(wèn)進(jìn)行重定向設(shè)置。在我司的平臺(tái)上,最直接最有效的做法是通過(guò)URL重寫(xiě)規(guī)則實(shí)現(xiàn)。下面給出URL重寫(xiě)實(shí)現(xiàn)重定向的的一些常用范例。

注意:在設(shè)置301重定向之前務(wù)必備份相應(yīng)目錄下的.htaccess文件。(Windows主機(jī)是在/htdocs目錄下,Linux主機(jī)是在根目錄下)

1.重定向domain.comwww.domain.com

RewriteEngine On

 RewriteCond %{HTTP_HOST} !^www.domain.com$ [NC]

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

2.重定向www.domain.comdomain.com

RewriteEngine On

 RewriteCond %{HTTP_HOST} !^domain.com$ [NC]

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

3.重定向olddomain.comwww.newdomain.com

RewriteEngine On

 RewriteCond %{HTTP_HOST} !olddomain.com$ [NC]

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

 

4.重定向olddomain.com newdomain.com

RewriteEngine On

 RewriteBase /

 RewriteCond %{HTTP_HOST} ^olddomain.com$ [NC]

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

5.重定向domain.com/file/file.php otherdomain.com/otherfile/other.php

RewriteEngine On

RewriteCond %{HTTP_HOST} ^www.domain.com$

 RewriteRule ^file/file.php$ http://www.otherdomain.com/otherfile/other.php [R=301,L]

冀州市| 天津市| 公主岭市| 石门县| 保康县| 永济市| 永平县| 郯城县| 舟曲县| 郧西县| 榆林市| 麟游县| 张掖市| 义乌市| 天全县| 县级市| 石河子市| 米林县| 安顺市| 墨江| 舟曲县| 新蔡县| 娄烦县| 巫溪县| 岱山县| 上思县| 突泉县| 榆林市| 四子王旗| 天台县| 永春县| 延长县| 岳普湖县| 安国市| 新巴尔虎左旗| 枣阳市| 靖安县| 章丘市| 山西省| 得荣县| 阜南县|