27
Dec
2021

WordPress 上https后auto redirect 301 error

在wp-config.php里面增加:

define(‘WP_HOME’,’https://portal.hkwl.org’);

define(‘WP_SITEURL’,’https://portal.hkwl.org’);

define(‘RELOCATE’, true);if ( isset( $_SERVER[‘HTTP_X_FORWARDED_PROTO’] ) && ‘https’ == $_SERVER[‘HTTP_X_FORWARDED_PROTO’] ) {    $_SERVER[‘HTTPS’] = ‘on’;}

Share

You may also like...