I'm trying to figure out the best way of handling this situation, maybe someone here can help.
Basically I'm working on a site where some pages need to be encrypted and others should not be encrypted to cut down on overhead. I came up with a quick system for defining which pages should be encrypted - it's a simple controller that converts a http:// address to https:// and initiates a 301 redirect. Specifying which areas of the site should be secure is a simple matter of adding them to routes.php and sending them to the redirect controller.
Of course, if any of those secured sites actually needed to be routed to a different controller, the method above wouldn't work. So basically I'm at a loss for how to implement a universal check across all pages to make sure they're appropriately encrypted or unencrypted without a lot of code repetition.
Any insights on how to handle this?