wordpress 开启ssl后重定向过多

解决办法:

第一步修改:wp-config.php

$_SERVER['HTTPS'] = 'on';
define('FORCE_SSL_LOGIN', true);
define('FORCE_SSL_ADMIN', true);

/var/www/html/wp-includes# vim canonical.php

将canonical.php文件,第37行

function redirect_canonical( $requested_url = null, $do_redirect = true ) {

修改为:第二步

//function redirect_canonical( $requested_url = null, $do_redirect = true ) {

https://www.chinaz.com/web/2012/0327/242582.shtml

Leave a Reply

Your email address will not be published. Required fields are marked *