Hello, we have been trying to convert our site to https/ssl, but after the switch:

1. The admin section does not load correctly (unstyled).
2. Some of the files are not loading correctly.

Are there settings in .htaccess that could be the issue maybe? I can't think of what could be different between the two environments.

Thanks!

Comments

VM’s picture

jcharlesberry’s picture

Yes, I have been reading that, but there's a lot of things there I have no experience with. Was hoping someone would have had the same problem.

UPDATE: Eureka! I found that this

$_SERVER['HTTPS'] = 'on';

Fixed all the issues. Thanks for the recommendation.

onejam’s picture

Add this to your htaccess file:

  RewriteCond %{HTTP_HOST} !^example\.com$ [NC,OR]
  RewriteCond %{HTTPS} off
  RewriteRule ^(.*)$ https://example.com/$1 [R=301,L]

This ensures your whole site gets redirected to HTTPS

Also, double check that all images and files are served with HTTPS (this inlcudes external links added to your site), otherwise you'll only see a partial secure site in the address bar.

-----------------------------------------------------------------
We build engaging websites and intuitive designs that will benefit your business.
Duvien