开发者

Enforce HTTPS on a site folder

As the title suggests is there any easy way to enforce HTTPS for certain site folders.

I am hoping that there is a soluti开发者_JAVA技巧on to this using web.config settings.

We are using IIS 6 and ASP.NET Webforms and .NET 4.0

Does any one have any ideas or could point me in the right direction?


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


This helps you http://www.msexchange.org/tutorials/ssl_enabling_owa_2003.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜