嗨,我正在尝试为特定域实现 https 重定向,比如 https://www.primeurl.com,而我在同一台服务器上托管了多个使用相同 web.config 文件的网站,但我只希望此重定向适用于我的“primeurl.xml”。 com”而不是其他域。是否有可能?如果是,我如何在 web.config 中编写 url-rewrite 代码
<system.webServer>
<rewrite>
<rules>
<rule name="Force HTTPS" stopProcessing="true">
<match url="(.*)" ignoreCase="true" />
<conditions>
<add input="{HTTPS}" pattern="off" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" appendQueryString="false" redirectType="Permanent" />
</rule>
</rules>
</rewrite>