PHP – Redirect to another web page
This post shows you how to redirect users to another web page using PHP. To do this, you simply use header
function as shown right below.
index.php
<?php
$url = 'https://bytenota.com';
header("Location: $url");
exit;
The redirect URL can be a relative URL like this:
<?php
$url = 'contact.html';
header("Location: $url");
exit;