How to redirect HTTP to HTTPS in MVC application (IIS7.5)

前端 未结 11 2098
情歌与酒
情歌与酒 2020-11-29 21:39

I need to redirect my HTTP site to HTTPS, have added below rule but I am getting 403 Error when tried using http://www.example.com, it works fine when I type https://www.exa

11条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-29 22:15

    I'm unable to add comments, but thought this supplementary info would maybe help somebody.

    I implemented the Global.asax idea with the 301 Permanent Redirect, and added http binding to the site in IIS. It still gave me 403 Forbidden until I remembered to untick "Require SSL" in SSL Settings.

提交回复
热议问题