PHP redirect using query string

<?php

$redirect = $_GET['redirect'];

/* Browse to http://hyperspatial.com?redirect=true
to access the redirect page */

if($redirect == "true")
{
header('Location: http://hyperspatial.com/redirect_page.html');
exit();
}

else header('Location: http://hyperspatial.com');
exit;

?>

0 Comments

You must be logged in to post a comment.