Jump to content

[SOLVED] Help with SSL link not working


m3media

Recommended Posts

I have installed my store and have it set to use SSL - however apparently it is not set correctly in whatever file controls that. It only shows error which says, "can not find host http:// "

Can someone please tell me which file to modify to correct this?

Link to comment
Share on other sites

Since no one seemed to know how to actually correct this issue I finally sorted it out myself and thought I would share.

In version 1.4.4 it seems that enabling SSL in Admin area does not typically work smoothly without doing some manual edits to the index.php file.

The lines as follows need to be edited by taking the 0, out of it.:

if ($config->get('config_ssl')) {
define('HTTPS_SERVER', 'https://' . substr($config->get('config_url'), 0, 7));
define('HTTPS_IMAGE', HTTPS_SERVER . 'image/');
} else {
define('HTTPS_SERVER', HTTP_SERVER);
define('HTTPS_IMAGE', HTTP_IMAGE);


So your corrected file should look like this:

if ($config->get('config_ssl')) {
define('HTTPS_SERVER', 'https://' . substr($config->get('config_url'), 7));
define('HTTPS_IMAGE', HTTPS_SERVER . 'image/');
} else {
define('HTTPS_SERVER', HTTP_SERVER);
define('HTTPS_IMAGE', HTTP_IMAGE);


Once this was done my SSL links worked perfectly.

Link to comment
Share on other sites

  • 1 month later...

Thanks for this info m3media. I am glad someone is posting their solutions to the problem of getting ssl to work on prestashop. Quick question. My index.php file doesn't contain any of the code above. Can you tell me specifically which index file this is and where it is located.

Thanks.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...