• Resolved krjojo

    (@krjojo)


    When I use

    wp_redirect("xxx",302);
    exit;

    An error will be generated. And it doesn’t work

    NOTICE: PHP message: PHP Warning: Cannot modify header information - headers already sent by (output started at /www/sites/www.xxx.com/index/wp-content/plugins/wp-fastest-cache/inc/admin-toolbar.php:35) in /www/sites/www.xxx.com/index/wp-includes/pluggable.php on line 1435

    I want to know how to ensure that redirection works?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Emre Vona

    (@emrevona)

    is the problem solved when you disable wp fastest cache?

    Thread Starter krjojo

    (@krjojo)

    Sorry, It’s my fault, I don’t know why WordPress sends out HTTP header information before entering the “add_submenu_page()” callback function, maybe

    <script>window. location. href=" https://www.xxx.com/ ";</script>

    is a better choice than “wp_redirect()”

    • This reply was modified 8 months, 3 weeks ago by krjojo.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Cannot modify header information – headers already sent’ is closed to new replies.