Wordpress get_template_directory_uri() returns http instead of https

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

    Did you try to force content delivery through https with a modified .htaccess file?

    below the snippet I'm using:

    #Force HTTPS
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
    

提交回复
热议问题