xxxxxxxxxx
// Set the Location header and redirect to a new page
header('Location: http://www.example.com/newpage.php');
exit;
xxxxxxxxxx
<?php
// This will just redirect you to example.com
header("Location: https://example.com");
?>
xxxxxxxxxx
<?php
// This will just redirect you to example.com
$url = "https://example.com";
header("Location: $url");
?>
xxxxxxxxxx
<html>
<?php
/* This will give an error. Note the output
* above, which is before the header() call */
header('Location: http://www.example.com/');
exit;
?>
xxxxxxxxxx
/*
This will just redirect you to example.com
*/
<?php
$url = "https://example.com";
header("Location: $url");
exit;
?>
/* I hope it will help you. Namaste */
xxxxxxxxxx
<?php
/*
This will redirect to facebook.com
*/
$url = "https://facebook.com.com";
header("Location: $url");
exit;
?>
xxxxxxxxxx
<?php
// This will redirect to google.com
$url = "https://google.com";
header("Location: $url");
?>
xxxxxxxxxx
<?php
// Redirect to mywebsite.com
header("location:https://mywebsite.com");
?>