I'm a bit closer to getting restrictions to a directory based on referrer. I think I need to use SetEnvIf but don't think I'm getting the syntax quite right. I've used syntax from the manual as a start and come up with:
SetEnvIf Referer www.domain.com intra_site_referrer
SetEnvIf Referer domain.com intra_site_referrer
<Directory>
Order Deny, Allow
Deny from all
Allow from env=intra_site_referrer
</Directory>
where domain is my domain
I've tried it with both <Directory> and <Directory /dirtoprotect>
Either way it denies access completely regardless of how the files are referenced. This is using Apache