Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Redirect https to http on non secure magento pages

Tags:

magento

Magento has some great built in functionality that if you request a page that should be secure e.g. the checkout via http then it redirects to https. However what seems to be lacking is if somebody requests a page that doesn't need to be secure e.g. a category page via https then there does not seem to be the functionality to redirect them to http.

So if somebody requests:

https://www.mysite.com/mycategory

they get 301 redirected to

http://www.mysite.com/mycategory

Anybody managed to achieve this?

If not then anybody able to point me in the direction of the bit of the magento core code that does the redirect to HTTPS and then I should be able to work from that to come up with a solution.

like image 983
Johnboy Avatar asked Nov 15 '12 14:11

Johnboy


1 Answers

Take a look at the following method

app/code/core/Mage/Core/Controller/Varien/Router/Standard.php::_checkShouldBeSecure()
like image 179
Rich Avatar answered Sep 21 '22 01:09

Rich