Howdy...I just finished surfing thru all 12 pages here (good info, BTW) but did not find an answer to my question...

I have a site directory where I want to allow access to certain domains, but disallow type-ins, etc. I have done this successfully in the past using something like the following...

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://.*mydomain.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://.*domain1.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://.*domain2.com/page/page.html.*$ [NC]

RewriteRule /* http://mydomain.com/error.html [R,L]

The problem I am running into is that this particular site uses Javascript extensively. For instance, many of the links on the main index page use Javascript to pop up new windows when a link is clicked on, and there are also quite a few javascript menus for navigation. It seems that these javascript windows and nav menus are not carrying a referer with it, because accessing the main page works as expected, clicking on any javascript link takes me to the error page...

Any ideas?