Redirect to a page or file
Moderator: General Moderators
Redirect to a page or file
How do i redirect a visitor to another page or file with PHP script 
try this:
<?php
header("Location: http://www.yoursite");
?>
if you want, you can use variables:
<?php
header("Location: $site");
?>
(go to http://yoursite.com/yourpage.php?site=h ... cation.com
remember:
do not print or write anything before the header tag!
this would not work:
<?php
print "hi!"
header("Location: $site");
?>
<?php
header("Location: http://www.yoursite");
?>
if you want, you can use variables:
<?php
header("Location: $site");
?>
(go to http://yoursite.com/yourpage.php?site=h ... cation.com
remember:
do not print or write anything before the header tag!
this would not work:
<?php
print "hi!"
header("Location: $site");
?>