How to fix AWS SNS API end point code that cause site not to load?

The root cause is this: function sns_endpoint_data() { // this line caused the site not to load $message = Message::fromRawPostData(); /* additional code follows… */ } add_action( ‘template_redirect’, ‘sns_endpoint_data’ ); There is no if condition checking if this is indeed the URL you desired to do this on. As a result, the Message::fromRawPostData() will load … Read more

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

So how to prevent the redirection? On the front-end/public side of a WordPress site, that redirection is done by redirect_canonical() which is hooked on template_redirect, and if you really must disable that non-www to www or www to non-www redirection, you can try the following (add the code to your theme’s functions.php file): For disabling … Read more