Removed the old RedirectToURL function and used builtin header()