Too many request redirect to cloudfront

Hi,

I have setup bitnami with cloudfront but after try to redirect from non-www too www it cause error said ERR_TOO_MANY_REDIRECTS

Configure 1: Configure the WordPress with NGINX and SSL domain name
Configure 2: Access an application using only a single domain with NGINX

if I remove that script configure it working normally but not go to cloudfront (www.mydomain.com) it goes to (mydomain.com)

How to redirect from root domain to www without cause of ERR_TOO_MANY_REDIRECTS?

Notes: cloudfront domain and www.mydomain.com is working (manually input) but what I want is when user type mydomain.com it should be redirect to www.mydomain.com for CDN.

Thanks,

if I change

define('WP_SITEURL', 'http://www.DOMAIN/');
define('WP_HOME', 'http://www.DOMAIN/');

It will cause error many redirect

if I remove www it work normal

define('WP_SITEURL', 'http://DOMAIN/');
define('WP_HOME', 'http://DOMAIN/');

so how to redirect to www.domain.com?

Hi @suloveoun,

The following guide shows how you can redirect to www:

https://docs.bitnami.com/ibm/apps/wordpress-pro/administration/redirect-custom-domains/#redirect-wwwmyappexamplecom-to-myappexamplecom

Regards,
Michiel