<?php $a = $_SERVER['HTTP_REFERER']; if ($a!="заданая страница") header("Location: http://sait.index.php"); ?>