DISCUZ x3.2 敞开https后ucenter通讯失利解决方法(301重定向https后通讯失利 按此方法处理)
uc目录model/misc.php
查找
$port = !empty($matches['port']) ? $matches['port'] : 80;
68行处后边参加以下代码
.htaccess 伪静态规矩 里边增加下面的规矩 即可完成跳转
# RewriteCond %{SERVER_PORT} !^443$
# RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R=301]
uc目录model/misc.php
查找
$port = !empty($matches['port']) ? $matches['port'] : 80;
68行处后边参加以下代码
if(substr($url,0,5)=='https'){ $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); if($post){ curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $post); } if($cookie){ curl_setopt($ch, CURLOPT_COOKIE, $cookie); } curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); return curl_exec($ch); } |
.htaccess 伪静态规矩 里边增加下面的规矩 即可完成跳转
# RewriteCond %{SERVER_PORT} !^443$
# RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R=301]
声明:有的资源均来自网络转载,版权归原作者所有,如有侵犯到您的权益 请联系邮箱:123456@qq.com 我们将配合处理!
原文地址:discuz开启https后 uc通信失败 的解决办法发布于2023-02-16 16:18:10