简体   繁体   English

Wordpress:http/https 超链接问题

[英]Wordpress: http / https hyperlink problem

An admin input field on a website I'm working on has https://url.co.uk in it, but is outputted on the frontend as just http://url.co.uk .我正在处理的网站上的管理员输入字段中有https://url.co.uk ,但在前端输出为http://url.co.uk Any Ideas as to why this is happening?关于为什么会发生这种情况的任何想法?

I think the links in the database/wp-config are still in http.我认为 database/wp-config 中的链接仍然在 http 中。

You can do 3 things:你可以做三件事:

If this isn't the case, try to clear your cache如果不是这种情况,请尝试清除缓存

Please use the bellow code at your wp-config.php to avoid http/https issue :请使用 wp-config.php 中的波纹管代码来避免 http/https 问题:

if (isset($_SERVER["HTTP_X_FORWARDED_PROTO"] ) && "https" == $_SERVER["HTTP_X_FORWARDED_PROTO"] ) {
$_SERVER["HTTPS"] = "on";
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM