<?php
header("Location: (redirect url)");
?>
header("Location: http://example.com");
die();
< ?php header("Location: http://www.redirect.to.url.com/"); ?>
<?php header ("location: http://domain.com/"); ?>
header("Location: /");
exit();
<php
header("location: http://www.yoursite.com");
?>
header("Location: http://example.com/redirect_page.php");
die(); //Force the script to quit, or you would raise an error...
function Redirect($url, $permanent = false)
{
header('Location: ' . $url, true, $permanent ? 301 : 302);
exit();
}
Redirect('http://example.com/', false);
//PHP redirect
header("Location: https://www.codegrepper.com/my-redirect-page.php");
die();
header("location: THE LOCATION"); //"THE LOCATION", put in a URL or directory to redirect to. For example, header("location: https://google.com/"); or header("location: ../../images/dog/");
function location($where){
echo '<script>window.location.href="'.$where.'"</script>';
}
location("https://youtube.com");
<% String redirectURL = "http://domain.com/";
response.sendRedirect(redirectURL); %>
if (...) {
// I am using echo here.
} else if ($_SESSION['qnum'] > 10) {
session_destroy();
echo "Some error occured.";
// Redirect to "user.php".
}