当前位置:论坛首页 > Windows面板 > 求助

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

发表在 Windows面板2017-9-12 10:49 [复制链接] 3 6135

回复本帖可获得 1 奖励! 每人限 1 次

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


使用道具 举报 只看该作者 回复
发表于 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:22:48 | 显示全部楼层
沐沐 发表于 2017-9-12 11:03
想全站https可自行修改伪静态实现

谢回复~不太会,再琢磨吧,
如大大有时间麻烦帮写下吧。谢谢
使用道具 举报 回复 支持 反对
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

企业版年付运维跟进群

普通问题处理

论坛响应时间:72小时

问题处理方式:排队(仅解答)

工作时间:白班:9:00 - 18:00

紧急问题处理

论坛响应时间:10分钟

问题处理方式:1对1处理(优先)

工作时间:白班:9:00 - 18:00

工作时间:晚班:18:00 - 24:00

立即付费处理
快速回复 返回顶部 返回列表