-1

I am starting on Magento 1.9.3.7 platform and after migrating a site in Magento 1x and enabled SSL the pages with https do not load the layout correctly.

Link

Checking the browser console, I see some mixed-content errors

Ex: Blocked loading mixed active content

In the administrative area of Magento already changed in

system >> settings >> web

The Base URL is safe and insecure, I already cleared Cache var/cache.

I also tried via PHPMyAdmin on the core_config_data table,

And I am not successful.

Would you like the help of Magento experts on how I can safely and conveniently change all these HTTP references to https?

Layout Ok

Layout Error

Kampai
  • 22,848
  • 21
  • 95
  • 95
artmuv
  • 21
  • 1
  • 3
  • Could the stylesheets/script urls be hardcoded somewhere in your template? – joeybab3 Aug 26 '19 at 17:23
  • 155/5000 I tried to perform a redirect through the .htaccess file forcing all http requests to change to https, it also didn't work. I used this code: RewriteEngine On RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteCond %{HTTPS} off RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] – artmuv Aug 27 '19 at 13:23

1 Answers1

0

Possibly you changed macros or configured secure HTTPS url in web/unsecure/base_url. That is forcing browser to load HTML via HTTPS while CSS styles still tried to be loaded via HTTP, then browser refuses to load style via not secure path.

Open your core_config_data table. Sort the table by path column by pattern secure/base

web/secure/base_url         https://www.example.com/
web/secure/base_link_url    {{secure_base_url}}
web/secure/base_skin_url    {{secure_base_url}}skin/
web/secure/base_media_url   {{secure_base_url}}media/
web/secure/base_js_url      {{secure_base_url}}js/
web/unsecure/base_url       http://www.example.com/
web/unsecure/base_link_url  {{unsecure_base_url}}
web/unsecure/base_skin_url  {{unsecure_base_url}}skin/
web/unsecure/base_media_url {{unsecure_base_url}}media
web/unsecure/base_js_url    {{unsecure_base_url}}js/

You need to change example.com accordingly by your domain name with mandatory trailing slash.

If you have set your base_url correctly for web/unsecure/base_url and web/secure/base_url, HTTPS should work well. If you don't know what is it for, you do not have to change the {{UNSECURE_BASE_URL}} and {{SECURE_BASE_URL}} macros in the rest of the entries.

Actually, macro like {{unsecure_base_url}}skin/ is transformed to: http://www.example.com/skin/ But if trailing slash is missed http://www.example.comskin/

Kaimin
  • 13
  • 2
  • Thank you very much, But this information is already configured in the database. – artmuv Aug 27 '19 at 13:20
  • If https:// configured as secure and http:// configured as unsecure, and there is no overrides for views and store then issue is not on the database level. Check layout phtml files if there is unsecure url used to load CSS. If there is `http://www.example/skin/css/style.css` used replace it with no http/https by `//skin/css/style.css` – Kaimin Aug 27 '19 at 17:52