amazon – How to prevent redirection from non-www to www or vice versa?
In WordPress, it seems that if I define:
define('WP_SITEURL', 'https://www.example.com'); define('WP_HOME', 'https://www.example.com');
Then all non-www version such as https://example.com will be redirected to www version and the response header will be:
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 https://stackoverflow.com/questions/20503322/cloudfront-distribution-with-custom-origin-redirects-request/22571467#22571467
So how to prevent the redirection?