WordPress.org

Forums

Quick Page/Post Redirect Plugin
[resolved] hook qppr_do_redirect not working (2 posts)

  1. Jouni T
    Member
    Posted 2 years ago #

    I have tried to add to page redirect support for query parameters (?a=1&b=2) without success. Currently code I try to use is following:

    add_action('qppr_do_redirect','customized_redirect',10,2);
    function customized_redirect($redirect_url, $redirect_type)
    {
        if (!empty($_SERVER['QUERY_STRING']))
        {
            $redirect_url .= "?{$_SERVER[QUERY_STRING]}";
        }
        wp_redirect($redirect_url, $redirect_type);
    }

    But this hook is not used when plugin does page redirect. I also noticed that plugin author has discussed six months ago about adding support for query parameters but at least I haven't found where this behavior could be used.

    Things I have tried also are:

    1. use hook ppr_do_redirect = not working
    2. Use quick redirects instead = not working because quick redirects have to be 1:1 with marked url (so when url is http://mysite/redirect/?a=1&b=2 , quick redirect created for /redirect/ return 404 instead of redirect)

    http://wordpress.org/extend/plugins/quick-pagepost-redirect-plugin/

  2. prophecy2040
    Member
    Plugin Author

    Posted 2 years ago #

    This should be working again in 5.0.3 - as well as a fix to the Querystring issue.

    Regards,
    Don

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Quick Page/Post Redirect Plugin
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.