You could use the vbulletin function print_standard_redirect():
Code:
// #############################################################################
/**
* Returns eval()-able code to initiate a standard redirect
*
* The global variable $url should contain the URL target for the redirect
*
* @param mixed Name of redirect phrase, or array if constructing a phrase.
* @param boolean If false, use the name of redirect phrase as the phrase text itself
* @param boolean Whether or not to force a redirect message to be shown
* @param integer Language ID to fetch the phrase from (-1 uses the page-wide default)
* @param bool Force bypass of domain whitelist check
*
* @return none (the session is re-directed).
*/
function print_standard_redirect($redir_phrase, $isphrase = true, $forceredirect = false, $languageid = -1, $bypasswhitelist = false)
{