I have a custom module with frontend actions that I want to be secure. So in my module's config.xml file I put this:
<secure_url> <mymodule_controller>/mymodule/controller</mymodule_controller> </secure_url> On it's own, this works great.
Secondly, in my controller's Index action I have this:
if (!Mage::getSingleton('customer/session')->isLoggedIn()) { $this->norouteAction(); return; } If I browse to example.com/mymodule/controller (or example.com/mymodule/controller/index) over HTTP, Magento redirects me to HTTPS, then sees that I'm not logged in and tries going to the norouteAction which is on HTTP, so Magento forces HTTP, and then it loops.
I get an infinite redirect loop.
Is there a way to use the noroute from an secure controller action without causing redirect loops?