I just need to create a rule in IIS (7.5) to redirect all my traffic for http to https. There are two potential ways of doing it. First is by installing and configuring URL rewrite module. Other one is by endabling httpRedirect. I am not sure what are the difference in these two and if any one is better than other?

有帮助吗?

解决方案

Not sure which approach is better, but I always use the RequireHttpsAttribute on an ActionResult so I have the control in my MVC application. When I'm moving the application to another server I don't have to (re)configure IIS.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top