Post by renopencart » Mon Mar 25, 2019 4:04 am

Hello all,

I am new to opencart - have a small site deployed on a linux server using docker bitnami image for opencart. The site seems to work great after installation, I wanted to secure the site with an ssl cert that i downloaded from letsencrypt for my domain. I placed the cert in the correct location (replaced the default created ones) when I go to my site https://abc123.com (example domain) it loads up perfect and I get the green padlock - the issue is when I type just the domain name in a browser such as: abc123.com, http://abc123.com or www.abc123.com it does not redirect to the https site which Is what I am trying to do.

I've scoured the support here and googled for hours and tried different suggestions that many users mentioned.

changes I made:

changed both config.php files to point to https instead of http
made the change in the admin console in opencart to turn on ssl

Many examples on the web said to add configurations such as the one below into my .htaccess file which should be at the root of the opencart folder.
I didn't see a .htaccess file in this location even with ls -la so I created one and put the recommended directives

RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteRule ^(.*) https://domain.com%{REQUEST_URI} [R=301,L,NE]
RewriteBase /
* I made sure my real domain name is in place of the "domain.com" in the configurations above of course :)
tried many different configurations but nothing seems to make a difference as I still get errors such as " this site can't be reached ERR_Connection_Refused" in chrome and "Safari can't connect to the server" when typing in a browser any of the following: abc123.com, http://abc123.com or www.abc123.com


hoping someone can shed some light on this - I have spent the better part of a day trying to get this to work. Any suggestions would be appreciated! thanks in advance!

Ren

Newbie

Posts

Joined
Mon Mar 25, 2019 3:07 am

User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom
Who is online

Users browsing this forum: Majestic-12 [Bot] and 412 guests