【待反馈】win iis10 强制https打不开
winiis10配置ssl以后,强制https打不开,然后https://www.bt.cn/bbs/thread-51777-1-1.html 按照这个操作,一直都是500什么项目?ASP还是PHP?重复检查设置是否存在问题,可以将设置贴出来看看帮你分析一下 堡塔运维赤井秀一 发表于 2021-6-29 10:21
什么项目?ASP还是PHP?重复检查设置是否存在问题,可以将设置贴出来看看帮你分析一下 ...
asp
<?xml version="1.0" ?>
<configuration>
<location allowOverride="false" inheritInChildApplications="false" path=".">
<system.webServer>
<rewrite>
<rules configSource="web_config\rewrite.config"></rules>
</rewrite>
<defaultDocument configSource="web_config\default.config"></defaultDocument>
<httpErrors configSource="web_config\httpErrors.config"></httpErrors>
<handlers configSource="web_config\php.config"></handlers>
</system.webServer>
</location>
</configuration>
宝塔用户_zhbloh 发表于 2021-6-29 10:23
asp
看了一下,你这也没有设置强制HTTPS吖,将下面的规则放到system.webserver里面
<rewrite>
<rules>
<rule name="HTTP to HTTPS redirect" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
</conditions>
<action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}/{R:1}" />
</rule>
</rules>
</rewrite>
堡塔运维赤井秀一 发表于 2021-6-29 10:28
看了一下,你这也没有设置强制HTTPS吖,将下面的规则放到system.webserver里面
放进去就打不开网页了 <?xml version="1.0" ?>
<configuration>
<location allowOverride="false" inheritInChildApplications="false" path=".">
<system.webServer>
<rewrite>
<rules>
<rule name="HTTP to HTTPS redirect" stopProcessing="true">
<match url="(.*)" ></match>
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" ></add>
</conditions>
<action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}/{R:1}" ></action>
</rule>
</rules>
</rewrite>
<defaultDocument configSource="web_config\default.config"></defaultDocument>
<httpErrors configSource="web_config\httpErrors.config"></httpErrors>
<handlers configSource="web_config\php.config"></handlers>
</system.webServer>
</location>
</configuration>
宝塔用户_zhbloh 发表于 2021-6-29 10:38
放进去就打不开网页了<?xml version="1.0" ?>
<configuration>
<location allowOverride="false" inheritInChildApplications="false" path=".">
<system.webServer>
<rewrite>
<rules>
<rule name="HTTP to HTTPS redirect" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}"
redirectType="Permanent" />
</rule>
</rules>
<outboundRules>
<rule name="Add Strict-Transport-Security when HTTPS" enabled="true">
<match serverVariable="RESPONSE_Strict_Transport_Security"
pattern=".*" />
<conditions>
<add input="{HTTPS}" pattern="on" ignoreCase="true" />
</conditions>
<action type="Rewrite" value="max-age=31536000" />
</rule>
</outboundRules>
<rules configSource="web_config\rewrite.config"></rules>
</rewrite>
<defaultDocument configSource="web_config\default.config"></defaultDocument>
<httpErrors configSource="web_config\httpErrors.config"></httpErrors>
<handlers configSource="web_config\php.config"></handlers>
</system.webServer>
</location>
</configuration>
试试 堡塔运维赤井秀一 发表于 2021-6-29 10:58
试试
500 - 内部服务器错误。
您查找的资源存在问题,因而无法显示。 堡塔运维赤井秀一 发表于 2021-6-29 10:58
试试
修改失败,配置文件格式不正确,请确保配置文件是有效的XML格式! 宝塔用户_zhbloh 发表于 2021-6-29 11:10
修改失败,配置文件格式不正确,请确保配置文件是有效的XML格式!
调整一下格式就可以了,直接复制肯定不能用的;方法就是按照上面贴的那样的,那是完整配置,设置正确是可以用的。
这需要一点基础,或者你到网上找其他方案吧。
页:
[1]