Post by opencartkorn » Fri May 20, 2016 1:24 pm

Hi,

1. After logging in via /admin with SSL/HTTPS, it reverts to regluar HTTP://
2. If i prefix HTTPS:// it goes back to SSL/HTTPS...

I have followed the steps to setup SSL properly, and the store works with SSL if i point to HTTPS://
The admin login page also works with SSL, if i point to HTTPS://

It is only after logging in, it reverts to HTTP://, not HTTPS://

I have added HTTPS:// in both admin and store root config.php, what else is needed?

Any help would be appreciated.

Newbie

Posts

Joined
Fri May 20, 2016 1:20 pm

Post by paulfeakins » Fri May 20, 2016 7:00 pm

opencartkorn wrote:I have added HTTPS:// in both admin and store root config.php, what else is needed?
If you're sure you've added it correctly in config.php and /admin/config.php then it's probably your .htaccess file.

If you paste it here after blanking out any sensitive info we'll be able to tell ...

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

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

Post by harap » Mon May 23, 2016 12:00 pm

Change all http to htps for config files in both root and admin. This fixed same problem in my case.

Force redirect coding also needed in .htaccess

Active Member

Posts

Joined
Wed Sep 16, 2015 12:34 am
Location - United States

Post by StitchnBe » Wed Sep 07, 2016 7:09 am

Please help, I am having the same issue but solutions offered have not worked. I am running 2.2.0.0. Problem is as follows for me:

Unable to force ssl on opencart

Steps taken
1) Turned "Use SSL" on in settings under server
2) Changed the config.php file to "define('HTTP_SERVER', 'https://<myurl.com>/');" as well as image and admin

It still doesn't force https.

What else can we try?

New member

Posts

Joined
Sat May 17, 2014 3:48 am

Post by ADD Creative » Wed Sep 07, 2016 5:05 pm

Have you changed the config.php in the admin directory?

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by StitchnBe » Thu Sep 08, 2016 6:48 am

ADD Creative wrote:Have you changed the config.php in the admin directory?
Yes but it started throwing "error undefined" messages and I lost ability to process orders from the admin dashboard. It also turned all the icons to squares and failed to show the map and sales analytics. We had to go back to how it was before that fix to restore admin functions.

New member

Posts

Joined
Sat May 17, 2014 3:48 am

Post by ADD Creative » Thu Sep 08, 2016 10:28 pm

So what are your HTTP_SERVER and HTTPS_SERVER (and depending on version HTTP_CATALOG and HTTPS_CATALOG) set to in your admin config.php?

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by StitchnBe » Fri Sep 09, 2016 8:14 am

ADD Creative wrote:So what are your HTTP_SERVER and HTTPS_SERVER (and depending on version HTTP_CATALOG and HTTPS_CATALOG) set to in your admin config.php?
Using Version 2.2.0.0. The settings are:

// HTTP
define('HTTP_SERVER', 'http://www.mystore/admin/');
define('HTTP_CATALOG', 'http://www.mystore.com/');
define('HTTP_IMAGE', 'http://www.mystore.com/image/');
// HTTPS
define('HTTPS_SERVER', 'https://www.mystore.com/admin/');
define('HTTPS_CATALOG', 'https://www.mystore.com/');
define('HTTPS_IMAGE', 'https://www.mystore.com/image/');

New member

Posts

Joined
Sat May 17, 2014 3:48 am

Post by ADD Creative » Fri Sep 09, 2016 6:31 pm

Seem some of the code for the URLs was changed for 2.2.0.0 and then changed back for 2.3.0.0. See https://github.com/opencart/opencart/co ... 9834fa061f

You can't just make these changes as things have changed in the index.php or framework.php. But you may be able to get it working by looking at other versions.

The is also a topic on it here. http://forum.opencart.com/viewtopic.php?t=159011

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by StitchnBe » Sun Sep 11, 2016 6:24 am

ADD Creative wrote:Seem some of the code for the URLs was changed for 2.2.0.0 and then changed back for 2.3.0.0. See https://github.com/opencart/opencart/co ... 9834fa061f

You can't just make these changes as things have changed in the index.php or framework.php. But you may be able to get it working by looking at other versions.

The is also a topic on it here. http://forum.opencart.com/viewtopic.php?t=159011

Thanks for your reply. I am not a developer and those links made my head hurt. Wondering if I would be better off upgrading to 2.3.0.2...would that be a simpler solution to my issue?

New member

Posts

Joined
Sat May 17, 2014 3:48 am

Post by ADD Creative » Tue Sep 13, 2016 5:58 pm

Looks like it was fixed in 2.3 onwards, so upgrading may help. Remember to backup your files and database before any attempt to upgrade. You could also try upgrading a test copy of your site first to check if it fixes the issue or introduces any other issues.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom
Who is online

Users browsing this forum: No registered users and 89 guests