In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you the solution that css cannot be loaded after wordpress opens ssl. I hope you will gain a lot after reading this article. Let's discuss it together.
Wordpress open ssl after css can not load the solution: 1, find the functions.php file, and change the "js/css" path to the relative path; 2, add the code "if ($_ SERVER ['HTTP_X...)" in the wp-config.php.
The problem that css cannot be loaded when ssl is enabled in wordpress
Method 1: find functions.php and add the following code:
Add_filter ('script_loader_src',' agnostic_script_loader_src', 20style_loader_src', 2); function agnostic_script_loader_src ($src, $handle) {return preg_replace ('/ ^ (http | https): /',', $src);} add_filter ('style_loader_src',' agnostic_style_loader_src', 20 src); function agnostic_style_loader_src ($src, $handle) {return preg_replace ('/ ^ (http | https): /','', $src);}
Method 2: add this line to the wp-config.php
If ($_ SERVER ['HTTP_X_FORWARDED_PROTO'] = =' https') $_ SERVER ['HTTPS'] =' on'
But make sure your changes come before this line.
Require_once (ABSPATH. (wp-settings.php'): after reading this article, I believe you have some understanding of the solution that css cannot load after wordpress turns on ssl. If you want to know more about it, welcome to follow the industry information channel. Thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.