Forums

[Plugin: Permalink Redirect] Producing and showing content before redirect (1 post)

  1. diablodale
    Member
    Posted 3 years ago #

    Hello. While testing permalink redirect 1.01 from http://yoast.com/wordpress/permalink-redirect/ on IIS 6.0 with WordPress 2.7.1, I've noticed an odd behavior. I can see substantial parts of the page before the redirect occurs.

    The plugin uses
    wp_redirect($url,301)
    which in wp-includes/pluggable.php results in a
    header("Refresh: 0;url=$location")

    I ask for your opinion on a potential code change to no longer produce and show the content if a redirect is to occur.

    In some quick testing, I added one line to permalink-redirect.php after line 40 which is the call to wp_redirect. That new code is:
    exit();

    Do you think this change is safe and will result in successful redirects while not producing or showing any page content?

Topic Closed

This topic has been closed to new replies.

About this Topic