iis7.5重定向中match是什么意思

如题所述

web.config 写法如下:

<system.webServer>
<rewrite>
<rules>
<rule name="域名重定向301" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{HTTP_HOST}" pattern="^mysite\.com$" />
</conditions>
<action type="Redirect" url="http://www.mysite.com/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>

===========================

当在浏览器输入 http://mysite.com/xxx.html 时候:
重定向为
http://www.mysite.com/xxx.html
这是正确的 没错。追问

如果我只是想把 http://mysite.com/aaa/xxx.html跳转到http://www.mysite.com/aaa.html;但是http://mysite.com/bbb.xxx.html不用跳转,可以吗?如果可以的话,要怎么写?

温馨提示:答案为网友推荐,仅供参考

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网