【发布时间】:2014-03-25 21:08:06
【问题描述】:
<rewrite>
<rules>
<rule name="HTTP to HTTPS redirect" enabled="true" stopProcessing="true">
<match url="(.*)" ignoreCase="true" />
<conditions>
<add input="{HTTPS}" pattern="OFF" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Found" />
</rule>
</rules>
</rewrite>
我在我的 web.config 文件中使用了上述 url 重写规则来为整个站点启用 SSL。 现在我需要更改上述规则以过滤 2 个应该作为 http 工作的 url。 假设这些网址为https://www.domain.com/owner/Marketing 和https://www.domain.com/owner/getinfo。 目前这些网址是 https 因此上面的规则。那么我怎样才能改变上面的规则来过滤以上 2 个网址(即 http://www.domain.com/owner/Marketing 和 http://www.domain.com/owner/getinfo )?
【问题讨论】:
标签: asp.net-mvc-3 c#-4.0 ssl url-rewriting