$url=isset($_GET['u'])?$_GET['u']:null;if (!preg_match('/^[a-z]{3,5}:\/\//i', $url)){ // reparamos? $url='http://'.$url;}header('location: '.$url);exit;