Post by pex48 » Wed Jun 27, 2018 3:22 am

I've googled numerous websites for an answer. I've edited config.php files as stated in root and admin folder. Also placed a redirect instruction using this example.

RewriteEngine On
RewriteCond %{HTTP_HOST} ^opencart.worldfortesting\.com [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://opencart.worldfortesting.com/$1 [R,L]

It is redirecting to HTTPS in every format except when I type in http:// example.com

Any advice? Thanks

New member

Posts

Joined
Thu Dec 26, 2013 9:52 pm

Post by straightlight » Wed Jun 27, 2018 3:31 am

See this solution: http://forum.opencart.com/viewtopic.php ... 71#p632944 . Adjust the domain name to your domain name from the provided codes.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by pex48 » Wed Jun 27, 2018 3:51 am

Thanks for the reply. I sorted it with a different code I got from another search for general websites. Seems to work. :-)

New member

Posts

Joined
Thu Dec 26, 2013 9:52 pm

Post by pex48 » Wed Jun 27, 2018 8:32 pm

Spoke too soon. Thought everything was fine. When I didn't get any orders overnight realised something's not right.

Went to website and found I couldn't add anything to the cart however many items I click on. Have now removed the forced redirect to SSL and all okay. If I put my website address in with https it goes there but when I go to any page or add an item it no longer shows as secure but the items are added. Presuming the issue is with the HTTPS version?

Just to clarify, did I need to edit the config.php files (in root & admin) as follows:
You need to locate the following section in both of your files:

// HTTPS
define('HTTPS_SERVER', 'http://yourdomain.com/');

Modify the line to include https instead of http:

// HTTPS
define('HTTPS_SERVER', 'https://yourdomain.com/');
Any ideas? Thanks!

New member

Posts

Joined
Thu Dec 26, 2013 9:52 pm

Post by straightlight » Wed Jun 27, 2018 9:26 pm


Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by pex48 » Wed Jun 27, 2018 9:31 pm

Update. The failure to add to cart is down to HTTPS not the re-direct. Opencart just not working with it. properly. SSL also selected in Opencart under 'server'.

New member

Posts

Joined
Thu Dec 26, 2013 9:52 pm

Post by straightlight » Wed Jun 27, 2018 9:45 pm

Especially with the v3.x releases, the SSL protocol validations have been re-worked. It's an issue that's already been solved.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 46 guests