wordpress https admin too many redirects code example
Example 1: wordpress https too many redirects
define('WP_HOME','https://mywebsite.com');
define('WP_SITEURL','https://mywebsite.com');
$_SERVER['HTTPS'] = 'on';
Example 2: wp-admin too many times redirect wordpress
if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false)
$_SERVER['HTTPS']='on';