Custom SSL Pages

Permalink
Hello All,

I know it's possible to make the whole site use SSL but is it also possible to only have certain pages secured? for instance a cart checkout page or a page to collect personal information?

Could this be accomplished by using a single page type that forces SSL for example:


if($_SERVER["HTTPS"] != "on") {
header("Location: "https://" . $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"]);
exit();
}

Or would that just make the page loop around because the BASE_URL settings under the site.php page?

Any help is appreciated, thanks.

(for some reason when i was using the code tags on this post the system was changing the above code also please note the S under the http was removed by the system was well.)

mdzoidberg
 
ryan replied on at Permalink Reply
ryan
if it bounces add this to your site.php

define('REDIRECT_TO_BASE_URL', false);
mdzoidberg replied on at Permalink Reply
mdzoidberg
Nice! thanks for the help Ryan.