第一步: 登录OpenCart后台, 系统管理 》 设置 ,点击 Server 选项卡。 选中【use SSL】
默认后台地址:http://www.gworg.com/admin (gworg.com请改成自己的域名)
第二步: 前端支持SSL , 编辑根目录的 config.php
define('HTTPS_SERVER', 'http://www.gworg.com/'); define('HTTPS_IMAGE', 'http://www.gworg.com/image/');
把http://替换为https://
define('HTTPS_SERVER', 'https://www.gworg.com/'); define('HTTPS_IMAGE', 'https://www.gworg.com/image/');
修改后保存.
第三步: 后端启用SSL , 编辑 admin/config.php 文件
define('HTTPS_SERVER', 'http://www.gworg.com/admin/'); define('HTTPS_CATALOG', 'http://www.gworg.com/'); define('HTTPS_IMAGE', 'http://www.gworg.comimage/');
把http://替换为https://
define('HTTPS_SERVER', 'https://www.gworg.com/admin/'); define('HTTPS_CATALOG', 'https://www.gworg.com/'); define('HTTPS_IMAGE', 'https://www.gworg.com/image/');