Try adding this in the 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 could also make it so you add your own domain to the referer check:
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://the-ok-domain.com [NC]
RewriteCond %{HTTP_REFERER} !^http://your-domain.com [NC]
RewriteRule ^ http://the-website-of-your-choosing.com/ [L,R]
Then you can include all of your pages in the check.
Note that referers can be easily forged and any htaccess file using mod_rewrite in any of your subdirectories will supercede these rules (unless those htaccess files have the RewriteOptions inheret
option set)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…