wp_redirect problem using code snippets

You can’t use wp_redirect or make HTTP redirects from inside a shortcode, redirects must happen before HTTP headers are sent out, before any HTML is sent to the browser, so shortcodes will always be too late. So I looked around and I believe the problem is that some content is sent to the browser before … Read more

wp_redirect() doesn’t work

The problem is not what you are doing, but when you are doing it. When your browser requests a webpage, that webpage arrives with a set of HTTP headers, followed by a HTTP body that contains the HTML. Redirection is done via a HTTP header. The moment you echo, or printf or send any form … Read more

subpages are redirecting to the homepage

And there’s no redirection happening in the .htaccess file? You may want to check the control panel at WPEngine and verify that there’s not a redirection setup in their panel. It won’t be a canonical URL issue as that doesn’t affect redirection, only indexing in search engines. If I enter https://stgtrulite.wpengine.com/platform/?123 it redirects to https://stgtrulite.wpengine.com/?123 … Read more