How to PHP redirect to another URL

Q: How to redirect to another URL ?
A: You can easily redirect using following header("Location: ....) syntax:

<?php
/* Redirect browser */
header("Location: http://redirect.ceae.info/");
 
/* Make sure that code below does not get executed when we redirect. */
exit;
?>

Enjoy !

Leave a Reply

Your email address will not be published. Required fields are marked *

5 + 1 =


This site uses Akismet to reduce spam. Learn how your comment data is processed.