ob_start ( ) ; $url = parse_url( $_SERVER [ 'REQUEST_URI' ] ); header ( 'Location: http://test2.ru'. $url['path']);