【问题标题】:redirect http to https. Which is better approach and why?将 http 重定向到 https。哪种方法更好,为什么?
【发布时间】:2012-03-25 02:52:46
【问题描述】:

我只需要在 IIS (7.5) 中创建一个规则,将我的所有 http 流量重定向到 https。有两种可能的方法来做到这一点。首先是安装和配置 URL 重写模块。另一种是通过启用httpRedirect。我不确定这两者有什么区别,是否有一个比另一个更好?

【问题讨论】:

    标签: asp.net-mvc-3 url-rewriting iis-7.5 http-redirect


    【解决方案1】:

    不确定哪种方法更好,但我总是在ActionResult 上使用RequireHttpsAttribute,因此我可以控制我的MVC 应用程序。当我将应用程序移动到另一台服务器时,我不必(重新)配置 IIS。

    【讨论】:

      猜你喜欢
      • 2014-05-27
      • 2019-02-23
      • 2012-03-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-02-18
      • 2018-02-12
      相关资源
      最近更新 更多