discuz x3.2升级到x3.4并且开启全站SSL

discuz X从3.2升级到3.4很简单,直接按照官网的文档就可以了,主要问题升级上来的网站开启SSL会出现某些问题

首先,开启SSL的话,需要再后台把能改成https的地方全部改成https,这样对于新站就是全站SSL了

其次,对于升级上来的网站,会发现楼层点评中的头像链接仍然是http,这是因为点评头像的链接会直接缓存与pre_forum_postcache表中,我们目前只能在输出的时候对http://进行替换(在数据库中直接把http换成https, 会造成点评不显示,具体的原因还需要查看源代码才清楚)

打开模板 view_node_body.htm, 查找$comment [ avatar ], (把空格去掉)替换为:

{eval echo str_replace("http://","https://",$comment[ avatar ]);}

把avatar两侧的空格去掉

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.