今天第一次用https,设置成功后发现后台登陆不了了,显示空白,针对此问题有需要看你所用的帝国cms版本是什么:
以下方法适用帝国cms7.5版本:
7.5版本已经有了http和https自动识别,但是因为一些疑难杂症的原因,自动识别判断的不准,后台登录也是空白,
我们可以打开e/config.php查找’httptype’=>0改为’httptype’=>2即可
‘httptype’=>0, 代表自动
‘httptype’=>1,代表全站http
‘httptype’=>2,代表全站https
‘httptype’=>3,代表后台https,前台http
‘httptype’=>,代表后台http,前台https
以下方法适用帝国cms7.2和以下的版本:
方法一、
打开/e/class/connect.php文件,ctrl+h
查找return 'http://'.$domain;
替换为 return ($_SERVER['HTTPS'] ? 'https':'http').'://'.$domain;
方法二、
步骤一:找到/e/class/connect.php文件中如下代码:
function eReturnDomain(){ $domain=RepPostStr($_SERVER['HTTP_HOST'],1); if(empty($domain)) { return''; } return 'http://'.$domain; }
替换成:
$domain=RepPostStr($_SERVER['HTTP_HOST'],1); if(empty($domain)) { return ''; } return ($_SERVER['HTTPS'] ? 'https':'http').'://'.$domain;}步骤二:
找到
function FWeReturnDomain(){ $domain=RepPostStr($_SERVER['HTTP_HOST'],1); if(empty($domain)) { return ''; } return 'http://'.$domain;}
替换为:
$domain=RepPostStr($_SERVER['HTTP_HOST'],1); if(empty($domain)) { return ''; } return ($_SERVER['HTTPS'] ? 'https':'http').'://'.$domain;}
2019-10-14 11:58:03