Well, actually WordPress provides wp redirect
function. And here is a small plugin I’ve used a while back
<?php
$redirect_meta_key = 'redirect_to';
add_action('template_redirect', 'redirect_this');
function redirect_this($nothing)
{
global $wp_query, $redirect_meta_key;
if(is_single() || is_page()) {
$redirect = get_post_meta($wp_query->post->ID, $redirect_meta_key, true);
if('' != $redirect) {
wp_redirect($redirect);
header("Status: 302");
exit;
}
}
}
?>
No all you have to do is to it in a custom field redirect_to
with a value of absolute path to the other page, or alternatively, add a custom meta box