Wordpress get_template_directory_uri() returns http instead of https

前端 未结 7 1386
暖寄归人
暖寄归人 2021-02-19 03:32

We have recently applied SSL certificate on our website and we want all our url to have https:// protocol.

Once we moved our website to https://, our website broke down

7条回答
  •  忘了有多久
    2021-02-19 03:38

    Check the $_SERVER['HTTPS'] value. This should be set to on or 1. If it has any other value while being set, this function will output http rather than https.

    See: https://core.trac.wordpress.org/browser/tags/4.5.3/src/wp-includes/functions.php#L4025

提交回复
热议问题