2012-07-25 67 views
1

我有这个在我的web.config文件:IIS 7 URL从http改写为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> 
</system.webServer> 

我检查了规则在IIS管理器中添加,但它似乎并不奏效。我已要求SSL关闭。

所以,如果我去webvts.mprin.com或http://webvts.mprinc.com,我收到404未找到错误。但是,如果我去https://webvts.mprinc.com,一切正常。

回答

2

我遇到了这个问题与我的SharePoint Web应用程序。这是一个具有Extranet扩展名的内联网。 Extranet仅设置为443.一旦我在端口80的IIS的Extranet应用程序中添加了绑定,重定向就成功了。