OpenCart SSL: How to Load All Pages with HTTPS
You’ve enabled an SSL certificate for your OpenCart site, but it disappears from some of the pages?
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 1
Use your favorite FTP client or File Manager in cPanel and edit your .htaccess file.
Step 2
Copy and Paste these 3 lines of code in the .htaccess
file:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Save & close!
Step 3
Edit 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 4
Repeat 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.
Summary
Share this tutorial if it helped you and subscribe to our blog for weekly updates with more helpful guides like this one.