Forum Moderators: phranque
RewriteEngine on
RewriteCond %{HTTP_REFERER} .
RewriteCond %{HTTP_REFERER}!^http://(www\.)?myowndomain\.net [NC]
RewriteCond %{HTTP_REFERER}!^http://(www\.)?somewhereelse\.com [NC]
RewriteRule \.(gif¦htm)$ http://www.myalloweddomain.net/site/ [R=302,NC]This allows access from www.myowndomain.net, myowndomain.net, www.somewhereelse.com and somwhereelse.com.
That solution allows access from those four referers and blocks everything else. However, I want to reverse the process, by allowing access from everything else and block only some referers.
Also, it should be noted that I'm trying to block all access to my site, not just access to my images or particular pages.
Can I do that with .htaccess? If so, how?
Thanks a lot,
Matthew