【发布时间】:2017-05-11 02:30:22
【问题描述】:
我想将我的 Extranet 网站重定向到 https 我有以下 web.config 规则:
<location path="." inheritInChildApplications="false">
<system.webServer>
<rewrite>
<rules>
<rule name="Redirect to https" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" `enter code here`ignoreCase="true" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}"
redirectType="Permanent" appendQueryString="false" />
</rule>
</rules>
</rewrite>
</system.webServer>
</location>
问题出现是因为我的服务器上托管了几个子服务,我不希望它们也重定向,我只想重定向站点而不是服务。
【问题讨论】:
标签: http https url-rewrite-module