Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/azure/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Azure重定向HTTPS返回404_Azure_Iis_Https_Web Config - Fatal编程技术网

Azure重定向HTTPS返回404

Azure重定向HTTPS返回404,azure,iis,https,web-config,Azure,Iis,Https,Web Config,因此,我在Azure web.config中编写了以下重写规则,以将流量重定向到https: <rule name="Redirect to HTTPS" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTPS}" pattern="^OFF$" /> </conditions>

因此,我在Azure web.config中编写了以下重写规则,以将流量重定向到https:

   <rule name="Redirect to HTTPS" stopProcessing="true">
      <match url="(.*)" />
      <conditions>
        <add input="{HTTPS}" pattern="^OFF$" />
      </conditions>
      <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" />
   </rule>


我不确定目前的问题是什么

愚蠢的问题……您的开发/测试是在共享环境中进行的吗?可以肯定的是,ssl在免费或sharedValid问题上不受支持,而且在专用环境中也不受支持。如果我将重写从web配置中取出,我可以单独访问http和https,但是当重写到位时,上面的问题2就发生了。您是否有规则名称之前的节点。。我刚刚在一个基本的网站上做了一个测试,我已经按照你的规则运行了,它成功了。当我访问HTTP时,我会被重定向到HTTPS