Page 1 of 1
One single link won't switch to HTTPS
Posted: Tue Apr 04, 2017 8:36 am
by emartin3
Hi!
My store (
https://www.store.hellbendermedia.com/) basically seems to be running nicely, but there's a weird thing happening.
I'm using version 2.3.0.2.
I have my SSL certificate in place and all the interior links seem to go to the HTTPS version of the website, but...
...but...
On each page is the graphic logo image at the top -- as is common with many shops.
When I hover over the icon, the URL it CLAIMS it will go to is an HTTPS URL.
But when I actually click that logo, it goes to an HTTP version of the home page (which means that a lot of other things look like crap).
How can I fix this so that the logo links to the HTTPS version of the site?
Thank you kindly!
Re: One single link won't switch to HTTPS
Posted: Tue Apr 04, 2017 9:04 am
by fido-x
In
catalog/controller/common/header.php, at line 73, replace:
Code: Select all
$data['home'] = $this->url->link('common/home');
with:
Code: Select all
$data['home'] = $this->url->link('common/home', '', true);
Re: One single link won't switch to HTTPS
Posted: Tue Apr 04, 2017 11:50 am
by emartin3
I tried the change.
When I hovered over the logo, the URL "hint" presented below as:
Code: Select all
https://www.store.hellbendermedia.com/index.php?route=common/home
When I clicked it, the URL it arrives at is:
Code: Select all
http://www.store.hellbendermedia.com/
Which is where not to be.
So I did this in the header.php file:
Code: Select all
$data['home_old'] = $this->url->link('common/home', '', true);
$data['home'] = ('');
And that seemed to do exactly the trick. The logo now links to the HTTPS version of the home page.
Is there a ramification to this fix I am not understanding, that may bite me in the ass later?
Re: One single link won't switch to HTTPS
Posted: Tue Apr 04, 2017 6:03 pm
by paulfeakins
Please double-check that you are listing HTTPS in all of the links in both of your config files.
Re: One single link won't switch to HTTPS
Posted: Thu Apr 13, 2017 1:30 am
by emartin3
I checked a config.php file in my root directory and a config.php file in my admin directory.
The one in the admin directory contains:
Code: Select all
// HTTP
define('HTTP_SERVER', 'https://www.store.hellbendermedia.com/admin/');
define('HTTP_CATALOG', 'https://www.store.hellbendermedia.com/');
// HTTPS
define('HTTPS_SERVER', 'https://www.store.hellbendermedia.com/admin/');
define('HTTPS_CATALOG', 'https://www.store.hellbendermedia.com/');
and the one in root contains:
Code: Select all
// HTTP
define('HTTP_SERVER', 'https://www.store.hellbendermedia.com/');
// HTTPS
define('HTTPS_SERVER', 'https://www.store.hellbendermedia.com/');
I'll look for others, too, but maybe I'm missing some?
I am noticing that other links to go the non-https version of the site as well (such as the breadcrumbs HOME button), but I presume there may be a common source of the issue, instead of me hunting down each and every one of these?
Thank you kindly!
Re: One single link won't switch to HTTPS
Posted: Thu Apr 13, 2017 5:12 am
by victorj
check your .htacccess file for redirects to http
Re: One single link won't switch to HTTPS
Posted: Thu Apr 13, 2017 7:45 am
by emartin3
These are all the redirects that exist in my .htaccess file:
Code: Select all
RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=extension/feed/google_base [L]
RewriteRule ^system/download/(.*) index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
RewriteCond %{QUERY_STRING} ^route=common/home$
RewriteCond %{REQUEST_METHOD} !^POST$
RewriteRule ^index\.php$ http://%{HTTP_HOST}? [R=301,L]
Re: One single link won't switch to HTTPS
Posted: Sun Apr 16, 2017 5:36 pm
by sculptex
That very bottom line is forcing http. Try changing it to https.
Re: One single link won't switch to HTTPS
Posted: Mon Apr 17, 2017 9:10 am
by emartin3
"The bottom line..."
That was it -- thank you so much for the help!
I was looking right at it and thinking [something that turned out to be wrong]!
