WordPress.org

Support

Support » Plugins and Hacks » [Resolved] hook qppr_do_redirect not working

[Resolved] hook qppr_do_redirect not working

  • 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/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] hook qppr_do_redirect not working’ is closed to new replies.