以下使用 PHP header 函数重定向:

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