我有一个在 IIS 服务器上运行的 ExpressionEngine 安装。目前我正在使用重写规则,它强制网站在每个页面上使用 HTTPS 协议。我想更改它,使其在除主页之外的每个页面上都使用 HTTPS。不幸的是,我只是对 web.config 重写规则知之甚少,无法弄清楚。提前致谢!
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<clear />
<rule name="Redirect to HTTPS" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="^OFF$" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>