Need 'deny all referrers except x' .htaccess code
This sounds crazy, but I need .htaccess code that will ONLY allow traffic to a particular page from a specific referrer. Any traffic to those pages from other pages should be rejected.
Believe it or not, this is a rare case where password protection is not an option.
allowedomain.com = domain that is allowed to link to the page.
examplesite.com/somepage/file.html = page that is being linked to.
alloweddomain.com should be able to link to examplesite.com/somepage/file.html without a problem. But if any/all other sites link to it then should give a 'Forbidden' error.
Preferably, direct requests via the browser should also be disallowed.
Does anyone know any .htaccess code that can pull this off?