本帖最后由 178885979 于 2017-9-12 10:50 编辑
按照相关教程设置了HTTP303到HTTPS,http://abc.com能自动到https://abc.com,但是内容页面不自动跳转(http://abc.com/e/1.html不跳转到https://abc.com/e/1.html,检测http://abc.com/e/1.html网站状态200)这个怎么办?web.config部分代码如下:
<rewrite>
<rules>
<rule name="/ Z-BlogPHP Imported Rule" stopProcessing="true">
<match url="^.*?" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php/{R:0}" />
</rule>
<rule name="/ Z-BlogPHP Imported Rule index.php" stopProcessing="true">
<match url="^index.php/.*?" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" />
</conditions>
<action type="Rewrite" url="index.php/{R:0}" />
</rule>
<rule name="HTTP to HTTPS redirect" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="^OFF$" />
<add input="{HTTPS_HOST}" pattern="^(LOCALHOST)" negate="true" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="SeeOther" />
</rule>
</rules>
</rewrite>
|
|