お名前.comのサーバーに構築したWordPressの無限ループを直す

2024.07.22
原因はロードバランサとサーバー間のプロトコルの違いで無限ループするらしい。
wp-config.phpに以下を追記すれば直ります。
if ( ! empty( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' ) {
$_SERVER['HTTPS']='on';
}
2時間くらいハマってました。
この記事のコメント一覧(2)
zoritoler imol 2025-03-04 23:42:21
Heya! I'm at work surfing around your blog from my new iphone! Just wanted to say I love reading your blog and look forward to all your posts! Keep up the great work!zoritoler imol 2025-02-04 03:47:09
I’ve recently started a web site, the information you offer on this web site has helped me greatly. Thank you for all of your time & work.