http res link in https

#1
After active the plugin in wordpress, I noticed that the css/js link are still in http mode.
litespeed.jpg


how can I fix this issue? thanks!
 
#3
Jietu20210630-112432.jpg

i have tried clean all the caches, still not work.
the plugin i actived listed here:
active plugins = array (
0 => 'aioseo-image-seo/aioseo-image-seo.php',
1 => 'aioseo-local-business/aioseo-local-business.php',
2 => 'aioseo-news-sitemap/aioseo-news-sitemap.php',
3 => 'aioseo-video-sitemap/aioseo-video-sitemap.php',
4 => 'akismet/akismet.php',
5 => 'all-in-one-seo-pack-pro/all_in_one_seo_pack.php',
6 => 'better-recent-comments/better-recent-comments.php',
7 => 'bp-better-messages/bp-better-messages.php',
8 => 'buddypress/bp-loader.php',
9 => 'child-theme-generator/child-theme-generator.php',
10 => 'classic-editor/classic-editor.php',
11 => 'clean-archives-reloaded/clean-archives-reloaded.php',
12 => 'easy-watermark/easy-watermark.php',
13 => 'easy-wp-smtp/easy-wp-smtp.php',
14 => 'enlighter/Enlighter.php',
15 => 'envira-gallery1.8.9.2/envira-gallery.php',
16 => 'file-manager-advanced/file_manager_advanced.php',
17 => 'host-webfonts-local/host-webfonts-local.php',
18 => 'html5-cumulus/html5-cumulus.php',
19 => 'jetpack/jetpack.php',
20 => 'litespeed-cache/litespeed-cache.php',
21 => 'oss-aliyun/aliyun-oss-wordpress.php',
22 => 'recent-posts-widget-with-thumbnails/recent-posts-widget-with-thumbnails.php',
23 => 'sassy-social-share/sassy-social-share.php',
24 => 'tinymce-advanced/tinymce-advanced.php',
25 => 'wordpress-https/wordpress-https.php',
26 => 'wp-posturl/wp-posturl.php',
27 => 'yet-another-related-posts-plugin/yarpp.php',
)
thanks.
 

Unique_Eric

Administrator
Staff member
#6
I see, it's an Nginx server so should have no cache.
The problem may be due to your Home URL and Site URL are set to HTTP instead of HTTPS.
 

Unique_Eric

Administrator
Staff member
#9
Seems you have changed the optimization tool and got the same result when visiting the site with HTTPS. e.g.
Code:
http://h4ck.org.cn/wp-content/cache/wpo-minify/1627397795/assets/wpo-minify-footer-wp-embed.min.js
Maybe you can try Force HTTPS on Nginx, and see how it works.
 
#10
Seems you have changed the optimization tool and got the same result when visiting the site with HTTPS. e.g.
Code:
http://h4ck.org.cn/wp-content/cache/wpo-minify/1627397795/assets/wpo-minify-footer-wp-embed.min.js
Maybe you can try Force HTTPS on Nginx, and see how it works.
yes ,I have tried "WP-Optimize - Clean, Compress, Cache", in https mode it mostly like litespeed.
However, "WP Fastest Cache" works both in http and https mode. but I noticed that this plugin not compress css/js file,all files links no changes.
 
Last edited:
#11
I have fixed this with this code(wp-config.php):
PHP:
// Work out if we are using https
$isSecure = false;
if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') {
    $isSecure = true;
}
elseif (!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' || !empty($_SERVER['HTTP_X_FORWARDED_SSL']) && $_SERVER['HTTP_X_FORWARDED_SSL'] == 'on') {
    $isSecure = true;
}
$REQUEST_PROTOCOL = $isSecure ? 'https://' : 'http://';
define( 'WP_CONTENT_URL', $REQUEST_PROTOCOL.$_SERVER['HTTP_HOST'] . '/wp-content');
define( 'WP_HOME', $REQUEST_PROTOCOL.$_SERVER['HTTP_HOST'] );
now works fine.
 
Top