Removed RedirectToURL function and just used the builtin PHP header function