出站Web.Config URL重写

时间:2019-01-17 13:27:51

标签: asp.net asp.net-mvc url redirect url-rewriting

通过这种方式,我可以重定向入站:

<rewriteMaps>
    <rewriteMap name="StaticRewrites">
      <add key="/documentation.html" value="/support" />

通过这种方式,我可以重定向出站:

<rules>
    <rule name="breaking changes 12 redirection" stopProcessing="false">
      <match url="support/breaking_changes_12" ignoreCase="true" />
      <action type="Redirect" url="https://company.zendesk.com/hc/en-us/articles/360015680XXX-Breaking-Changes-12" redirectType="Permanent" appendQueryString="true" logRewrittenUrl="true" />
    </rule>
    <rule name="breaking changes redirection" stopProcessing="false">
      <match url="support/breaking_changes" ignoreCase="true" />
      <action type="Redirect" url="https://company.zendesk.com/hc/en-us/sections/360002839XXX-Older-versions" redirectType="Permanent" appendQueryString="true" logRewrittenUrl="true" />
    </rule>

问题在于它总是在breaking_changes上赢得breaking_changes_12。如何避免这种情况?我在做什么错了?

谢谢。

0 个答案:

没有答案