We are implementing the WordPress site where I am trying to redirect the site from HTTP to HTTPs. Everything is set but still site is not able to redirect to HTTPs then below setting in Wordpress helped me to redirect.
Edit wp-config.php
if
(($_SERVER['HTTP_CLOUDFRONT_FORWARDED_PROTO'] ==
'https') OR ($_SERVER['HTTP_X_FORWARDED_PROTO'] ==
'https'))
{$_SERVER['HTTPS']='on';}
Edit wp-config.php
if
(($_SERVER['HTTP_CLOUDFRONT_FORWARDED_PROTO'] ==
'https') OR ($_SERVER['HTTP_X_FORWARDED_PROTO'] ==
'https'))
{$_SERVER['HTTPS']='on';}