Home / PHP Tips Generated By ChatGPT / Redirecting to a New URL in PHP Redirect the user to a new page using the header() function. Source Code header("Location: https://www.example.com"); exit; // Always call exit after header redirection