https://www.bilibili.com/video/a ... d4e43a474401203f485
虽然不懂,按照大老的操作也用上了免费的ssl。
第一步:
在https://aq.chinaz.com/ssl/index申请一张免费的证书,并下载下来。

第二步:
登录myssl.com,点工具-》证书链下载。

上传之前申请的cer证书代码,补全后就是你的证书了。
第三步:
到godaddy的后台,直接选择域名,粘贴证书会提示证书无效。应该先安装证书,再把证书绑定给域名。

第四个绑定域名和证书。

最后一步,强制https跳转。
这个在goddady上各种灰色无法设置,怎么开启autossl也开不了,301跳转是可以,但是会有css文件丢失等情况。
就是有部分文件还是按http,无法加载所以网站就排版乱了,查了各种网站查询解决办法还不一样。
最后找到一个通用解决办法。
OpenCart SSL: How to Load All Pages with HTTPS - Blogs | iSenseLabs
直接改网站的代码。
Apache ServerThis tutorial is valid if your OpenCart store is running on an Apache server.
Here’s what you can do to keep every page of your online store secure and ensure your online shoppers feel secure browsing your website. Step 1Use your favorite FTP client or File Manager in cPanel and edit your .htaccess file. Step 2Copy and Paste these 3 lines of code in the .htaccess file:
RewriteEngine On RewriteCond %{HTTPS} off
Save & close! Step 3Edit your config.php file in the OpenCart root (underneath the .htaccess file in the above screenshot). Under the // HTTPS line, change the protocol from http to https. Save & close! Step 4Repeat the same for the config.php file in your admin folder. Open the config.php here: Again, underneath the // HTTPS line change both http protocols to https. Save & close! Congratulations!Now go back to your OpenCart website and go through the pages.
You will see the SSL certificate active all around your website keeping each page secure.
Customers will now feel they’re browsing and shopping securely from your OpenCart store. SummaryShare this tutorial if it helped you and subscribe to our blog for weekly updates with more helpful guides like this one.
|