- 工信部備案號 滇ICP備05000110號-1
- 滇公網(wǎng)安備53011102001527號
- 增值電信業(yè)務經(jīng)營許可證 B1.B2-20181647、滇B1.B2-20190004
- 云南互聯(lián)網(wǎng)協(xié)會理事單位
- 安全聯(lián)盟認證網(wǎng)站身份V標記
- 域名注冊服務機構(gòu)許可:滇D3-20230001
- 代理域名注冊服務機構(gòu):新網(wǎng)數(shù)碼
比如我在一臺主機上的IIS站點綁定了兩個域名a.com和b.com,現(xiàn)在都要做301要指向不同網(wǎng)址,那么如何寫web.config呢?代碼如下:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="301-1" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="^a.com$" />
</conditions>
<action type="Redirect" url="a.com要跳轉(zhuǎn)的域名/{R:0}"
redirectType="Permanent" />
</rule>
<rule name="301-2" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="^b.com$" />
</conditions>
<action type="Redirect" url="b.com要跳轉(zhuǎn)的域名/{R:0}"
redirectType="Permanent" />
</rule>
</rules>
</rewrite>
<system.webServer>
</configuration>售前咨詢
售后咨詢
備案咨詢
二維碼

TOP