amazon – How to prevent redirection from non-www to www or vice versa?


In WordPress, it seems that if I define:

define('WP_SITEURL', '');
define('WP_HOME', '');

Then all non-www version such as will be redirected to www version and the response header will be:

X-Redirect-By: WordPress

This is OK for general cases. However, now I want to prevent such a redirection, because I am using Amazon Cloutfront and the redirection should be stopped, otherwise, there will be error. See

So how to prevent the redirection?

alancc 1 year 2021-09-14T20:58:17-05:00 0 Answers 0 views 0

Leave an answer