Jump to content

HTTPS (SSL) - insecure contents


Recommended Posts

My website doesnt display the content properly when i go into HTTPS mode. This is a problem only with google chrome because it detects unsecure content on my website.

 

My hosting company told me its because there is an issue wth my theme; there is unsecure links in my theme so i need to fix that!

 

 

I was told to alter my 'header.tpl' file on line 29 (in file manager):

<link href='http://fonts.googleapis.com/css?family=Gruppo' rel='stylesheet' type='text/css'>

 

i removed http in this code, but still no results. I still have the same problem with google chrome that detects insecure content when in https mode.

 

My last reply from a manager was:

Please note that the SSL issue is not related to the template. Not sure why but you PrestaShop is loading CSS and JS files via HTTP (no matter which protocol is used).

 

Please help!

Thanks for your replies!

 

My last reply from a manager was:

Please note that the SSL issue is not related to the template. Not sure why but you PrestaShop is loading CSS and JS files via HTTP (no matter which protocol is used).

Link to comment
Share on other sites

For example in my theme,

 

<link href='https://fonts.googleapis.com/css?family=Playfair+Display' rel='stylesheet' type='text/css' />
    <link href='https://fonts.googleapis.com/css?family=Open+Sans+Condensed:300' rel='stylesheet' type='text/css' />
    <link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css' />

Link to comment
Share on other sites

This what i have in my header.tpl:

 

 

{if isset($css_files)}

{foreach from=$css_files key=css_uri item=media}

<link href="{$css_uri}" rel="stylesheet" type="text/css" media="{$media}" />

{/foreach}

{/if}

<link href='http://fonts.googleapis.com/css?family=Gruppo' rel='stylesheet' type='text/css' />

{if isset($js_files)}

{foreach from=$js_files item=js_uri}

<script type="text/javascript" src="{$js_uri}"></script>

{/foreach}

{/if}

{$HOOK_HEADER}

<script type="text/javascript" src="{$js_dir}cookies.js"></script>

<script type="text/javascript" src="{$js_dir}script.js"></script>

<script type="text/javascript" src="{$js_dir}jscript_xjquery.jqtransform.js"></script>

Link to comment
Share on other sites

You must change,

<link href='http://fonts.googleapis.com/css?family=Gruppo' rel='stylesheet' type='text/css' />

 

to

 

<link href='https://fonts.googleapis.com/css?family=Gruppo' rel='stylesheet' type='text/css' />

 

Then, in order to see the change you must delete all the cache files in your browser, and the cache files created by PS.

 

In PS v1.5x the cache files are found in 2 places,

 

prestashop > cache

prestashop > theme > yourtheme > cache

 

alternatively you can set Prestashop to override the cache files

 

 

BO > Advanced Parameters > Performance

 

Set Template Cache to Force compilation

 

Set Cache to disabled.

 

You need change the above settings or delete the cache files and delete your browser cache after making some changes to PS. Otherwise you are just using a cached copy of the old file and not the new file that has your change.

Edited by Bill Dalton (see edit history)
Link to comment
Share on other sites

  • 2 months later...
  • 5 weeks later...

When you have the page loaded in your browser, view the source code and search for http

 

Regardless if the fault is PS VS. your theme, all links that are called will be in the source code.

 

Hope this helps. :)

 

 

Is there any quick way to change HTTP to HTTPS in all file?

Link to comment
Share on other sites

In Prestashop you set your SSL domain here,

 

Preferences > SEO & URLs

 

Prestashop will then turn on SSL in all areas of your web site where customer data is required.

 

If you want your entire web site under SSL, that would take custom programming.

Link to comment
Share on other sites

  • 4 weeks later...
  • 8 months later...

STEP 1:

 

Go to Preferences --->SEO & URL and set shop and SSL to "www.yourdomain.com"

 

STEP 2:

Go to Preferences --->General make sure SSL is set to "NO"

 

STEP3:

Go to your .htaccess file (in your root folder of the server) and use the following code

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L]

Put this code in before <ifModule mod_rewrite.c>

 

STEP4:

While in the .htaccess file, make sure rewriteCond says ^www.yourdomain.com$  NOT ^yourdomain.com$

 

STEP5 ENJOY!

Link to comment
Share on other sites

×
×
  • Create New...