http升级https的操作步骤

进入服务器的管理后台,申请SSL证书,打开服务器的管理软件,加载证书。

修改数据库中的SQL字段

UPDATE wp_options SET option_value = REPLACE(option_value, 'https://www.cntworld.cn', 'https://www.cntworld.cn');
UPDATE wp_posts SET post_content = REPLACE(post_content, 'https://www.cntworld.cn', 'https://www.cntworld.cn');
UPDATE wp_comments SET comment_content = REPLACE(comment_content, 'https://www.cntworld.cn', 'https://www.cntworld.cn');
UPDATE wp_comments SET comment_author_url = REPLACE(comment_author_url, 'https://www.cntworld.cn', 'https://www.cntworld.cn');
UPDATE wp_users SET user_url = REPLACE(user_url, 'https://www.cntworld.cn', 'https://www.cntworld.cn');

 

打开网站的根目录,以编辑模式打开.htaccess文件(如果没有就创建一个)添加如下代码

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.cntworld.cn/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^cntworld.cn [NC]
RewriteRule ^(.*)$ https://www.cntworld.cn/$1 [L,R=301]

打开网站后台,将手动添加的http链接改成https即可。

转载请注明出处:  https://www.cntworld.cn
智能工控 » http升级https的操作步骤

1 评论

  1. 😆 给力,必须得顶一个

发表回复

提供最优质的资源集合

立即查看 了解详情