0

Initially the site was working under HTTP protocol and everything was fine. Then we bought an HTTPS certificate and tried to open the site through HTTPS. All the css and js were broken. I opened the page source code and saw that all these files are loaded through HTTP.

@import url("http://...");

So, I opened /sites/default/settings.php. At first, I added $conf['https'] = TRUE; but it didn't work. Then I commented out $base_url.

//$base_url = 'http://sitename.com';  // NO trailing slash!

Afterward, both HTTP and HTTPS started to work.

Is it the correct way to solve the problem?

  • Do you want both HTTP and HTTPS, or do you want HTTPS only? – Patrick Kenny Nov 29 '17 at 13:12
  • @PatrickKenny Both – user4035 Nov 29 '17 at 13:56
  • Why would you want both to work? You could risk duplicate indexing with search engines. – erier Jan 5 '18 at 20:19
  • @erier "You could risk duplicate indexing with search engines." - yes, but it will decrease server load. – user4035 Jan 5 '18 at 21:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.