Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET MVC3 redirect from https to http

I'm using [RequireHttps] to force user to browse particular pages only on https. This works great but it has one issue. Once user navigates to another page it still has https. I want https browsing for only few pages. How to redirect user from Https to http? Is it possible using RedirectToAction() method?

like image 765
pramodtech Avatar asked Dec 20 '11 14:12

pramodtech


1 Answers

A better question would be why would you want the user to revert back to http when all the hard work of the hand-shaking as already been done so the overhead of using https over http is almost non-existent.

Have a look at this question

But answering your question, there is no implementation in MVC to do that, you'll have to do it yourself.

Have a look at this question, it describes how to do what you want.

like image 181
Yag Avatar answered Oct 06 '22 21:10

Yag