【发布时间】:2016-08-30 13:09:38
【问题描述】:
如何在 web.config 中调整自动重定向:
<rule name="Redirect_to_https" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="^OFF$" ignoreCase="true" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}{R:1}" redirectType="Permanent" appendQueryString="true" />
</rule>
以例如应用规则的方式
site1.internal.sw-company.com
site2.internal.sw-company.com
site3.internal.sw-company.com
到所有 3 个站点和子页面,但不到以下地址:service1.internal.sw-company.com(驻留在同一服务器上的服务)
我正在使用 C# 和 ASP.NET 4.5
【问题讨论】:
标签: c# redirect web-config