Wordpress get_template_directory_uri() returns http instead of https

前端 未结 7 1364
暖寄归人
暖寄归人 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:54

    view notes of link https://codex.wordpress.org/Function_Reference/is_ssl

    if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
    $_SERVER['HTTPS'] = 'on';
    

提交回复
热议问题