add header to php

PHP
<?php
// This will just redirect you to example.com
$url = "https://example.com";
header("Location: $url");  
?><?php
// This will redirect  to google.com
$url = "https://google.com";
header("Location: $url");  
?>
Source

Also in PHP: