Links From SSL pages to unsecure pages all broken

I hope someone can help poing me in the right direction as all the links from https pages to the http pages are broken at www.bulksupply.co.uk.



I know there must be a simple explanation, but have been tearing my hair out and having now installed CS cart three times to get it working. This last time I have made a point of not accessing the store (so that no cached pages can be creating the problem) and I have only made one change from the demo store installation - enabled secure server on checkout/admin/orders.



There is only one installation of the files, with the both secure site https://secure-applied.org.uk/bulksupply.co.uk being the same location on the server as http://bulksupply.co.uk (i.e. the secure site is one directory higher than the unsecure one so I have included this in the secure sites path during installation).



When you now access the store and go to the checkout, none of the links work. E.g. hovering over “home” shows https://secure-applied.org.uk/bulksupply.co.uk/index.php and when clicking on it you are redirected to error4 404 on http://www.bulksupply.co.uk/index.php?sef_rewrite=1



SEO has not been enabled so it shouldn't be re-writing anyway (although I will want to enable this, it still didn't work so am trying to demonstrate the problem with the minimum of modifications from a fresh installation to find out where I am going wrong).



// Host and directory where software is installed on no-secure server

$config['http_host'] = 'www.bulksupply.co.uk';

$config['http_path'] = '';



// Host and directory where software is installed on secure server

$config['https_host'] = 'secure-applied.org.uk';

$config['https_path'] = '/bulksupply.co.uk';



Everything else is default (including .htaccess) so I am surprised it doesn't work. I am impressed with CS cart - but since enabling the SSL option I can't even get the demo installation working - does anyone have any ideas? / Please HELP!!!

It looks to me like it is a caching problem, which is why I started with a fresh installation (I have been clearing the cache on CS Cart and PC but this hasn't helped). Even tried using different domain names and PC.



I have taken out the .htaccess file so you can see which pages CS Cart is trying to load and even with the demo installation it is using the longer directory structure of the secure site to access unsecure pages (i.e. it is adding in the extra directory /bulksupply.co.uk for the unsecure site). It is like it is ignoring the path for the unsecure site.



Does anyone have any ideas?

It looks like you have your /config.local.php file set up incorrectly. Most installs should be what you see below but I am not sure why you have “secure-applied.org.uk” in the secure URL.


// Host and directory where software is installed on no-secure server
$config['http_host'] = 'www.bulksupply.co.uk';
$config['http_path'] = '';

// Host and directory where software is installed on secure server
$config['https_host'] = 'www.bulksupply.co.uk';
$config['https_path'] = '';

Thank you for replying. The install is on http://www.bulksupply.co.uk and to access the same directory using a secure connection is https://secure-applied.org.uk/bulksupply.co.uk. i.e. the SSL is a different domain name at a higher directory. This would be the same as if you were using a shared SSL on a server - to access the files via a secure connection you use the shared domain name and then subdirectory to access the same files. Being able to configure the host / path for secure and no-secure suggests it is capable of having different settings - but it is ignoring the unsecure path and trying to access pages on the no-secure site using the additional directory structure of the secure path.



I suppose I could put something into .htaccess to redirect unsecure connections. I neither know if this is the right thing to do or how to do it. What I don't understand is why anyone using different domains and paths for secure / no-secure isn't having this issue as I cannot find a way of getting CS Cart to work with these settings (even with new / default installation).

I have had another evening trying to get to the bottom of this and tried may ways but still cannot get CS cart installed with the secure domain at a higher directory level to the unsecure one. The problem is still shown at www.bulksupply.co.uk when you access a secure page the links don't work back to the unsecured pages. Is this a known problem? Has anyone installed CS cart with a different http_path and https_path pointing to the same installation.



One problem may be the Rewrite Base would need to be different if you are accessing via the secure or unsecure path, however I suspect this isn't the only problem (but it may be part of it when using SEO?). I have tried using rewrite rules to redirect the incorrect links to the correct path but appeared to be barking up the wrong tree (still wouldn't work and lost everything after “?”). In any case, taking out .htaccess and not using SEO / rewrite it still doesn't work as the links don't use the right path in the first place (category links use the http_path when on the secure pages, therefore this path is too short and doesn't even reach the CS Cart installation).



Still struggling - please help!