change header location in php

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

Also in PHP: