Hai ragione anche te....


function redirect($url)
{
header("Location: " . $url);
die();
}