Redirect tag not working

currently I do not get the redirect tag to work.

Any form of redirect like

<Redirect to="" />
<Redirect to="/shop" />


Cannot modify header information - headers already sent ....

Have I missed something or is this a bug?

Hi there,
Can you provide some more info about how you are using this tag? As well as the PHP version.
I am currently working in PHP 8.2 and WordPress 6.1, which seem to be working as expected.

Hi Emma,

I use PHP 8.1 and WP 6.2.

Here is the code producing the error.

  <If user not_exists>
  <Redirect to="" />

hmm, I think we need more details about your environment in order to debug this issue. What theme do you use? Are there any plugins that you think might interfere with the wp_redirect() function from PHP?