IIS7 Url重写模块不起作用

时间:2017-01-04 09:45:32

标签: iis

我要设置如下规则:

<rewrite>
        <rules>
            <rule name="Test" stopProcessing="false">
                <match url="abcd.com/admin(.*)" />
                <action type="Redirect" url="xyz.com/admin{R:1}" logRewrittenUrl="true" />
                <conditions trackAllCaptures="true">
                </conditions>
            </rule>
        </rules>
    </rewrite>

当我尝试访问url:abcd.com/admin/login但操作无效时。请帮帮我。谢谢!

1 个答案:

答案 0 :(得分:0)

匹配网址不包含域名,因此您需要删除该网址:

 <match url="^admin(.*)" />