Table of Contents

PHP Redirect

To redirect to home page from any other page. Use this as index.php file in directories that users are not allowed to browse.

<?php
 
header('Location: http://' . $_SERVER['SERVER_NAME'] . '/');
 
?>

Reference

http://php.net/manual/en/function.header.php