01-13-2018, 02:20 PM
Hmm. I don't usually tell people to edit the header directly, but I think that's the cleanest way to do it.
Note that when you're doing updates, you should make sure that we didn't edit users/includes/header.php
So what you'll do is create an array of pages you don't want ssl for in this snippet below and use it to replace the if force_ssl == 1 thing in header.php
Note that when you're doing updates, you should make sure that we didn't edit users/includes/header.php
So what you'll do is create an array of pages you don't want ssl for in this snippet below and use it to replace the if force_ssl == 1 thing in header.php
Code:
if ($settings->force_ssl==1){
Code:
$nossl = ['index.php','account.php'];
Code:
if(!in_array($currentPage,$nossl)){
Code:
if (!isset($_SERVER['HTTPS']) || !$_SERVER['HTTPS']) {
Code:
$url = 'https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
Code:
Redirect::to($url);
Code:
exit;
Code:
}
Code:
}
Code:
}