Forum Moderators: phranque
Currently I host quite a few car racing videos that I have limited the ability to be linked to a select few sites with:
RewriteEngine on
RewriteCond %{HTTP_REFERER}!^$
RewriteCond %{HTTP_REFERER}!^http://site1.com/.*$ [NC]
RewriteCond %{HTTP_REFERER}!^http://site2.com.*$ [NC]
RewriteCond %{HTTP_REFERER} ^http://site1.net/.*$ [NC]
ReWriteRule *\.(wmv¦WMV¦MOV¦mov¦avi¦AVI¦mpg¦MPG¦MPEG¦mpeg)$ [invalidsite.com...] [R,L]
then when they link to a video from someplace that can't it redirects them to another video. What I'm trying to accomplish now is to incorporate blocking of requests with NO referer into the above. Reason being is people are just RCSA'ng or cutting and pasting links to get past blocking the referer.
Thanks
_B
Welcome to WebmasterWorld!
If none of those facts bother you, then remove the first RewriteCond from your code to block blank referrers.
Blocking by referrer and user-agent are unreliable at best. You can use them to cut down on some abuse, but the only way to stop abuse without hurting your legitimate users is to implement a proper access-control scheme, usually with passwords and cookies.
Jim
Thanks for your response, I did try it without the referer and found the results that you told me I would get.
OH well I guess I'll just password protect the forum.
Thanks a lot for your replies and in case anyone stumbles on this searching I used this to block those with no referer:
RewriteCond %{HTTP_referer} ^$
#RewriteRule .*\.(wmv¦avi¦mpg¦mpeg)$ www.site.com/index.html [R,L]