0

This question already has an answer here:

My Drupal site is using https:// but the base URL is not using it.

My site therefore is not opening properly. Is there any way to make Drupal pick up the correct base URL?

I tried adding $base_url in settings.php but it's giving me this error:

GET https://example.com/js/admin_menu/cache/6599fa6c7ea0ac232a88eaa63e957878 404 (Not Found)

marked as duplicate by kiamlaluno Jul 5 '16 at 19:58

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Forgive me for asking obvious, have you cleared all caches? drush cc all? – artfulrobot Dec 17 '14 at 19:59
0

Try setting the $base_url on the protocol:

  $base_url = ((isset($_SERVER['HTTPS'])) ? 'https://' : 'http://') . 'www.yoururl.com';
0

You need same thing : How to get the base url?.

function _get_base_url(){
  $protocol = ($_SERVER['HTTPS'] && ($_SERVER['HTTPS'] != "off")) ? "https" : "http";
  return $protocol . "://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
}

Not the answer you're looking for? Browse other questions tagged or ask your own question.