discuz修复强制HTTPS同步登录会提示 301 Moved Permanently问题 [复制链接]

moqu8 2018-10-18

2988 0
修改前强制HTTPS同步登录会提示 301 Moved Permanently,问题成功复现。修改后问题解决。修改前强制HTTPS同步登录会提示 301 Moved Permanently,问题成功复现。修改后问题解决。

修复方案:打开文件upload/uc_client/client.php,

查找代码:
$port = !empty($matches['port']) ? $matches['port'] : 80;
修改为:
$port = !empty($matches['port']) ? $matches['port'] : ($matches['scheme'] == 'https' ? 443 : 80);
查找代码:
if(!$fp = @fsocketopen(($ip ? $ip : $host), $port, $errno, $errstr, $timeout)) {
修改为:
if(!$fp = @fsocketopen(($scheme == 'https' ? 'ssl' : $scheme).'://'.($scheme == 'https' ? $host : ($ip ? $ip : $host)), $port, $errno, $errstr, $timeout)) {


然后保存文件即可!
563175bc83f5f061a8.png


最新回复 (0)
返回
支持中心
邮箱:winkill2012@qqcom
新站优化中!部分功能尚未完善,敬请谅解!
支持中心