phpcms 升级https 遇到的问题汇总一下

第一步,部署网站https ,本作者使用lnmp ssl证书免费的

二.程序修改部分

1.后台输入https的url可通过JS校验部分的修改

修改phpcms/modules/admin/site.php

大约45行和128行的正则 ('/http:\/\/(.+)\/$/i', $domain))

修改为: ('/(http|https):\/\/(.+)\/$/i', $domain))



修改phpcms/modules/admin/templates/setting.tpl.php

大约18行中的正则

http:\/\/(.+)[^/]$

修改为:http[s]?:\/\/(.+)[^/]$



修改phpcms/modules/admin/templates/site_add.tpl.php

大约13行中的正则:http:\/\/(.+)\/$
http[s]?:\/\/(.+)\/$



修改phpcms/modules/admin/templates/site_edit.tpl.php

大约11行中的正则:http:\/\/(.+)\/$

修改为:http[s]?:\/\/(.+)\/$



修改phpcms/modules/link/templates/link_add.tpl.php

大约10行中的正则

^http:\/\/[A-Za-z0-9]+\.[A-Za-z0-9]+[\/=\?%\-&]*([^<>])*$

修改为^http[s]?:\/\/[A-Za-z0-9]+\.[A-Za-z0-9]+[\/=\?%\-&]*([^<>])*$



修改phpcms/modules/link/templates/link_edit.tpl.php

大约11行中的正则:^http:\/\/[A-Za-z0-9]+\.[A-Za-z0-9]+[\/=\?%\-&]*([^<>])*$

修改为^http[s]?:\/\/[A-Za-z0-9]+\.[A-Za-z0-9]+[\/=\?%\-&]*([^<>])*$



修改phpcms/modules/link/index.php

大约41行和51行中的正则

/http:\/\/(.*)/i

修改为:/^http[s]?:\/\/(.*)/i



后台列表连接问题

大约74行中的正则

http:\/\/(.+)\/$

修改为:https:\/\/(.+)\/$


以上步骤修改后,注册用户 帐号登录等操作完全正常 和PHPSSO通信完全正常,后台添加信息和前台链接URL完全正常

注意:

1.如注册用户提示‘操作失败’,请在后台会员模块设置中关闭‘注册时可选会员模型’或者保证会员不少于两个会员模型