Removing Automatic Redirects Without Plugin

There’s a canonical_redirect, or redirect_canonical function, which gets hooked onto template_redirect. Just remove it using remove_action() in your config file or your theme’s functions file…