diff --git a/core/templates.php b/core/templates.php index b8bfe4f..23b3463 100644 --- a/core/templates.php +++ b/core/templates.php @@ -48,12 +48,11 @@ require_once "helpers.php"; //Get current URL and parameters for correct pagination - $protocol = $_SERVER['SERVER_PROTOCOL']; - $domain = $_SERVER['HTTP_HOST']; + $domain = $_SERVER['HTTP_HOST']; $script = $_SERVER['SCRIPT_NAME']; $parameters = $_GET ? $_SERVER['QUERY_STRING'] : "" ; - $protocol=strpos(strtolower($_SERVER['SERVER_PROTOCOL']),'https') === FALSE ? 'http' : 'https'; + $protocol=($_SERVER['HTTPS'] == "on" ? "https" : "http"); $currenturl = $protocol . '://' . $domain. $script . '?' . $parameters; //Pagination