ASP.NET: best practice for redirecting to https

后端 未结 4 1483
你的背包
你的背包 2021-02-02 03:21

I am working on a project that has one page that needs to make use of the SSL certificate. All of the links in the site to this page make use of https instead of http, but in th

4条回答
  •  猫巷女王i
    2021-02-02 03:54

    I'd use URL rewriting to do that. Why? because it's simple to implement, requires no modifications to the application, and is easy to maintain.

    On IIS7 you can accomplish that using URL rewrite module, for example:

    
    
      
      
        
      
      
    
    

    On IIS6 you'll have to use a 3rd party library. I use IIRF (http://www.codeplex.com/IIRF) it's free, stable, and has a good amount of features.

提交回复
热议问题