国产白浆流出一区二区-精品日韩欧美一区二区-亚洲欧美精品一区久久-久草精品在线播放视频

在線咨詢(xún)
QQ咨詢(xún)
服務(wù)熱線

020-85201717

13725302004

業(yè)務(wù)微信

微信開(kāi)發(fā)

TOP

怎么樣把多域名重定向到一個(gè)網(wǎng)站來(lái)用?

發(fā)布時(shí)間:2021-09-01 瀏覽:

怎樣實(shí)現(xiàn)多域名重定向到一個(gè)站點(diǎn)?相信大家還沒(méi)學(xué)會(huì)這個(gè)技能。通過(guò)這篇文章的詳細(xì)解說(shuō)希望你能學(xué)會(huì)。跟隨小編一起來(lái)看步驟吧。


教程開(kāi)始:


ABC.com


www.ABC.cn


www.ABC.net


ABC.cn


ABC.net


上面五個(gè)都重定向到


www.ABC.com


IIS7以上可直接添加在web.config配置文件里面實(shí)現(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>


解析設(shè)置:


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


第2種方式:如果買(mǎi)的是虛擬主機(jī),一般在虛擬主機(jī)的具體信息上,可以查到別名,把服務(wù)商提供的這個(gè)別名做為記錄值,

記錄類(lèi)型為cname,主機(jī)記錄為@和WWW,也可以實(shí)現(xiàn)。