Web.config SSL重定向失败:“需要模块资格”

时间:2019-08-27 14:44:03

标签: web-config

我的问题是关于web.config中的强制“ https://www”。 我做了很多搜索,但找不到可以帮助我的答案。

我的网站上的SSL证书可以正常工作,但是当我将以下代码粘贴到web.config中时,它将停止工作。 如果没有重定向,则只能在https://domain.nl上运行,而不能在https://www.domain.nl 上运行(Chrome:ERR_CONNECTION_RESET)。我的网站是https://relatie-voeding-gedrag.nl

代码:

<rewrite>
  <rules>
    <rule name="Redirect to HTTPS" stopProcessing="true">
      <match url="(.)" />
      <conditions>
        <add input="{HTTP_HOST}" pattern="^relatie-voeding-gedrag.nl$" negate="true" />
        <add input="{HTTPS}" pattern="OFF" ignoreCase="true" />
      </conditions>
      <action type="Redirect" url="http://relatie-voeding-gedrag.nl/{R:1}" />
    </rule>
    <rule name="Redirect to WWW" stopProcessing="true">
      <match url=". " />
      <conditions logicalGrouping="MatchAny">
        <add input="{HTTP_HOST}" pattern="^relatie-voeding-gedrag.nl$" />
      </conditions>
      <action type="Redirect" url="https://www.relatie-voeding-gedrag.nl/{R:0}" redirectType="Permanent" />
    </rule>
  </rules>
</rewrite>

先感谢

我的提供者的回答: “不是我们的脚本阻止了它,因为它起作用了。 让Encrypt对您的网站本身执行检查,然后您的网站停止检查。这是因为它出错了。 “

那我的网站为什么阻止支票?

0 个答案:

没有答案