<match url=".*" /> 這個url不帶域名的嗎?
網站用的域名泛匹配。
期望這樣的跳轉方式,我提供幾個范例:
http://test1.domainA.com/s.html?c=1234 跳轉到:
http://test1.domainB.com/s.html?c=1234
http://aa34234.domainA.com/s.html?c=556677跳轉到:
http://aa34234.domainB.com/s.html?c=556677
其中二級域名都是不定的,后面的引數也是不定的。
我做了運算式:^(.*?)domainA.com(.*)$
讓它跳轉到:{R:1}domainB.com{R:2}
{R:1}表示括號中匹配的第1組
{R:1}表示括號中匹配的第2組
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="test001" stopProcessing="true">
<match url="^(.*?)domainA.com(.*)$" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Redirect" url="{R:1}domainB.com{R:2}" redirectType="Permanent" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
上面代碼經過反復測驗并沒有效果。好像那個url只能匹配引數形式,沒道理啊
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/268714.html
標籤:ASP
上一篇:laydate 時間范圍限制
