diff --git a/upload/install/index.php b/upload/install/index.php index dbceedb0b0f..1a98f7ae773 100644 --- a/upload/install/index.php +++ b/upload/install/index.php @@ -3,8 +3,9 @@ error_reporting(E_ALL); // HTTP -define('HTTP_SERVER', 'http://' . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['SCRIPT_NAME']), '/.\\') . '/'); -define('HTTP_OPENCART', 'http://' . $_SERVER['HTTP_HOST'] . rtrim(rtrim(dirname($_SERVER['SCRIPT_NAME']), 'install'), '/.\\') . '/'); +$protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://"; +define('HTTP_SERVER', $protocol . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['SCRIPT_NAME']), '/.\\') . '/'); +define('HTTP_OPENCART', $protocol . $_SERVER['HTTP_HOST'] . rtrim(rtrim(dirname($_SERVER['SCRIPT_NAME']), 'install'), '/.\\') . '/'); // DIR define('DIR_APPLICATION', str_replace('\\', '/', realpath(dirname(__FILE__))) . '/'); diff --git a/upload/install/view/template/header.tpl b/upload/install/view/template/header.tpl index 7f3ac01ba6e..a914b4f2e81 100644 --- a/upload/install/view/template/header.tpl +++ b/upload/install/view/template/header.tpl @@ -8,7 +8,7 @@ - + \ No newline at end of file