<?php if ($_SERVER['HTTP_REFERER'] != 'http://mysite.ru/lol/index.html') { header('Location: http://mysite.ru/lol/index.html'); exit(); }