Try adding this to your htaccess file in your document root:
RewriteEngine On RewriteCond %{HTTP_REFERER} !^http://the-ok-domain.com [NC] RewriteRule ^/?first-page.html$ http://the-website-of-your-choosing.com/ [L,R]
You can also have your own domain added to the referent check:
RewriteEngine On RewriteCond %{HTTP_REFERER} !^http:
Then you can include all your pages in the check.
Please note that links can be easily faked, and any htaccess file using mod_rewrite in any of your subdirectories will cancel these rules (unless these htaccess files have the RewriteOptions inheret )
source share