开发者

Enforce HTTPS on a site folder

开发者 https://www.devze.com 2023-03-18 01:06 出处:网络
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.

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

精彩评论

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