怎樣實現(xiàn)多域名重定向到一個站點?

怎樣實現(xiàn)多域名重定向到一個站點?相信大家還沒學會這個技能。通過這篇文章的詳細解說希望你能學會。跟隨小編一起來看步驟吧。

讓客戶滿意是我們工作的目標,不斷超越客戶的期望值來自于我們對這個行業(yè)的熱愛。我們立志把好的技術(shù)通過有效、簡單的方式提供給客戶,將通過不懈努力成為客戶在信息化領(lǐng)域值得信任、有價值的長期合作伙伴,公司提供的服務項目有:申請域名、虛擬空間、營銷軟件、網(wǎng)站建設、常山網(wǎng)站維護、網(wǎng)站推廣。

教程開始:

ABC.com

www.ABC.cn

www.ABC.net

ABC.cn

ABC.net

上面五個都重定向到

www.ABC.com

IIS7以上可直接添加在web.config配置文件里面實現(xiàn)

<configuration>

<system.webServer>

<rewrite>

<rules>

<rule name="301-1 Redirect" stopProcessing="true">

<match url=".*" />

<conditions>

<add input="{HTTP_HOST}" pattern="^ABC.com$" />

</conditions>

<action type="Redirect" url="http://www.ABC.com/{R:0}" redirectType="Permanent" />

</rule>

<rule name="301-2 Redirect" stopProcessing="true">

<match url=".*" />

<conditions>

<add input="{HTTP_HOST}" pattern="^ABC.net$" />

</conditions>

<action type="Redirect" url="http://www.ABC.com/{R:0}" redirectType="Permanent" />

</rule>

<rule name="301-3 Redirect" stopProcessing="true">

<match url=".*" />

<conditions>

<add input="{HTTP_HOST}" pattern="^ABC.cn$" />

</conditions>

<action type="Redirect" url="http://www.ABC.com/{R:0}" redirectType="Permanent" />

</rule>

<rule name="301-4 Redirect" stopProcessing="true">

<match url=".*" />

<conditions>

<add input="{HTTP_HOST}" pattern="^www.ABC.net$" />

</conditions>

<action type="Redirect" url="http://www.ABC.com/{R:0}" redirectType="Permanent" />

</rule>

<rule name="301-5 Redirect" stopProcessing="true">

<match url=".*" />

<conditions>

<add input="{HTTP_HOST}" pattern="^www.ABCcn$" />

</conditions>

<action type="Redirect" url="http://www.ABC.com/{R:0}" redirectType="Permanent" />

</rule>

</rules>

</rewrite>

<httpRedirect enabled="false" destination="http://www.ABC.com" exactDestination="true" httpResponseStatus="Permanent" />

</system.webServer>

</configuration>

解析設置:

第1種實現(xiàn)方式:記錄類型為A記錄,記錄值為IP地址 主機記錄為@和WWW

第2種方式:如果買的是虛擬主機,一般在虛擬主機的具體信息上,可以查到別名,把服務商提供的這個別名做為記錄值,
記錄類型為cname,主機記錄為@和WWW,也可以實現(xiàn)

看完上述內(nèi)容,你們學會多域名重定向到一個站點的方法了嗎?如果還想學到更多技能或想了解更多相關(guān)內(nèi)容,歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道,感謝各位的閱讀!

本文標題:怎樣實現(xiàn)多域名重定向到一個站點?
文章源于:http://www.muchs.cn/article4/iidiie.html

成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供移動網(wǎng)站建設、虛擬主機、網(wǎng)站制作域名注冊、網(wǎng)站排名網(wǎng)站維護

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

網(wǎng)站優(yōu)化排名