2
我想我的外部網站重定向到HTTPS我有以下web.config中規則:URL重寫web.config中與位置HTTPS
<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>
這個問題是因爲我有幾個服務託管在我的服務器是兒童,我不希望他們也重定向,我只是想重定向網站而不是服務。