I want to build a plugin that grabs certain url params from the query string to build a new query string for the same page. I'm following the excellent the Professional WordPress Plugin Development book, but I'm not sure which hook to use for this action. Here is my action function:
add_action( 'init', 'tccl_redirect' );
function tccl_redirect() {
header ( "Location: http://www.mysite.com/$mypage?$newparam=$newvalue" );
?>
Which hooks are suitable for header redirects?
template_redirect
would also be my suggestion.