SSL and NON SSL Pages
Permalink 1 user found helpfulare we sure all the corners work? flash uploader.. etc? it's been a few versions since we had to do this ourselves.
<?php if ($_SERVER['HTTPS'] != 'on') { header('location:https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); } ?>
I'm not 100% sure that this would work, as php headers might have already been sent by the type this code executes. In that case, a controller would need to be created for the page type with this same code in it.
I know there's a million other "important" feature requests, but it might be useful to have a page attribute in the core called "Require SSL" and let the core handle redirecting to SSL. Just a thought...probably not too high of priority.
<?php
if ($_SERVER['HTTPS'] != 'on') {
header('location:https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
}
?>
again its been a few versions since we've done this... i imagine picnik will die.. etc.
Am I missing something?
so,http://yoursite.com would work the same as:
http://yoursite.com
If you wanted to require your site to be on ssl, you could not set the redirect to base url config and just set your base url to:
http://yoursite.com