【发布时间】:2013-04-01 00:47:46
【问题描述】:
我已经编写了一个基于用户代理重定向请求的规则。该规则设置为将默认请求(非移动)重定向到Domain1,并将来自移动设备的请求重定向到移动域Domain2。
即使在应用了移动重定向之后,来自移动的所有请求也会被带到Domain1。
请参阅下面的重定向规则。谁能告诉我我错过了什么?
<rewrite>
<rules>
<rule name="Mobile UA redirect" enabled="true" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTP_USER_AGENT}" pattern="^.*BlackBerry.*$ " />
<add input="{HTTP_USER_AGENT}" pattern=".*Mobile.*Safari" />
</conditions>
<action type="Redirect" url="Domain2" />
</rule>
<rule name="Claritinchallenge to" enabled="true" stopProcessing="true">
<match url="(.*)" />
<action type="Redirect" url="Domain1" appendQueryString="false" />
</rule>
</rules>
</rewrite>
【问题讨论】:
标签: iis url-rewriting url-rewrite-module