[bitnami] How to resolve the redirect loop on https wp-admin page

Change http to https on bitnami wordpress by aws cloudfront, but re-direct loop happened when login to wp-admin page by hostname.

For some reason, could login to wp-admin page by IP address directly, but in this case, link url on new articles was IPaddress.

That’s no good.

eventually, how to resolve this issue is not to modify htaccess file

to add below setting on wp-config.php

but on wp-login, re-direct loop is happen.

/** SSL */  
define('FORCE_SSL_ADMIN', true);  
// in some setups HTTP_X_FORWARDED_PROTO might contain  
// a comma-separated list e.g. http,https  
// so check for https existence  
if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false)  
    $_SERVER['HTTPS']='on';

Reference : ttps://wordpress.stackexchange.com/questions/170165/wordpress-wp-admin-https-redirect-loop

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です