178885979 发表于 2017-9-12 10:49:05

IIS强制HTTPS303跳转首页成功,内页不行

本帖最后由 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>


178885979 发表于 2017-9-12 10:56:32

我看宝塔论坛也是这样的情况,是否本身就只能这样?
比如本文地址http为http://www.bt.cn/bbs/thread-6470-1-1.html
然而并没有强制跳转到
https://www.bt.cn/bbs/thread-6470-1-1.html

沐沐 发表于 2017-9-12 11:03:30

想全站https可自行修改伪静态实现

178885979 发表于 2017-9-12 11:22:48

沐沐 发表于 2017-9-12 11:03
想全站https可自行修改伪静态实现

谢回复~不太会,再琢磨吧,
如大大有时间麻烦帮写下吧。谢谢;P
页: [1]
查看完整版本: IIS强制HTTPS303跳转首页成功,内页不行