Post by gpzzone » Sun Dec 02, 2018 8:51 pm

Hi guys - 2nd post please be kind ;D

OC V3.02
I have recently configured my site for SSL, by that I mean, turned it on and amended the config and admin config.

The site is stable and when I attempt to log in, or register as a new customer it goes direct to https, but it's looking for ...../index.php?route=account/login on the secure server. Obviously it's not finding it and returning a file not found error.

Should there be any files belonging to opencart in the https directory? Because mine's empty and it's clearly not redirecting back to the main catalogue directory.

I think my config files are OK -see below for comment and also HT access included too, so before I go to my hosts for server setting confirmations etc I thought I'd ask you all nicely to point out whatever it is I'm missing or have misunderstood.

If I put the entire installation in https - it's perfect, but I understand that OC should jump between secure and insecure environments as required.
My problem is I've clearly not understood how to help it achieve that!

Image
Image
Image

Thank you in advance for your wisdom.

CD

Newbie

Posts

Joined
Sat Aug 25, 2018 4:08 am

Post by IP_CAM » Sun Dec 02, 2018 11:17 pm

Both config.php Setting have either to look like:

Code: Select all

<?php
// HTTP
define('HTTP_SERVER', 'http://www.velomech.ch/shop/');
// HTTPS
define('HTTPS_SERVER', 'http://www.velomech.ch/shop/');
if you're on HTTP, or then like:

Code: Select all

<?php
// HTTP
define('HTTP_SERVER', 'https://www.velomech.ch/shop/');
// HTTPS
define('HTTPS_SERVER', 'https://www.velomech.ch/shop/');
if you work with HTTPS.
Ernie

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by ocmta » Mon Dec 03, 2018 1:54 am

gpzzone wrote:
Sun Dec 02, 2018 8:51 pm
but I understand that OC should jump between secure and insecure environments as required.
It really shouldn't, if you have SSL (https), then just redirect all http requests to https. Use https:// in both HTTP_SERVER and HTTPS_SERVER in both config.php files as explained in the reply above, and also in HTTP_CATALOG and HTTPS_CATALOG in admin/config.php, and add something like this to .htaccess to redirect all http requests to https:

Code: Select all

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [L,R=301]
Images with your configs and .htaccess are missing, so not sure what's there.

Extensions for affiliates (openCart 1, 2, 3):
Advanced Multi Level Affiliate System
Customer and Affiliate Accounts Combined into one Account
Affiliate Tracking with Coupons
Discount for Referred Customers - Order Total
Type Tracking Code
Mass Pay
Affiliate Transactions for openCart 3
Affiliate Pack X - all modules with 40% discount


Active Member

Posts

Joined
Mon Mar 12, 2012 11:21 am

Who is online

Users browsing this forum: No registered users and 5 guests