Parked domain redirect

Hi @user2924:

Use the 'template_redirect' hook; put the following in your theme’s ‘functions.php’ file:

add_action( 'template_redirect', 'yoursite_template_redirect' );
function yoursite_template_redirect() {
  if (strtolower($_SERVER['HTTP_HOST'])=='www.domain-b.com')
    wp_safe_redirect('http://www.domain-a.com/pagex'.$_SERVER['REQUEST_URI']);
    exit;
}