I'd say template_redirect
. But take a look at the Action Reference.
Example
Don't forget to exit()
on redirect.
/**
* This example redirects everything to the index.php page
* You can do the same for the dashboard with admin_url( '/' );
* Or simply base the redirect on conditionals like
* is_*() functions, current_user_can( 'capability' ), globals, get_current_screen()...
*
* @return void
*/
function your_unique_redirect_function wpse12535_redirect_sample() {
exit( wp_redirect( home_url( '/' ) ) );
}
add_action( 'template_redirect', 'your_unique_redirect_function''wpse12535_redirect_sample' );