View Single Post
Old 2005-11-24, 11:10 AM   #9
juggernaut
Registered User
 
juggernaut's Avatar
 
Join Date: Apr 2005
Location: Central Jersey! If I was rich and powerful I would dress as my avatar does.
Posts: 1,448
Send a message via Yahoo to juggernaut
Heres one I just found. Not sure if this works or not just did a google on htaccess and wmv
---------------------------------------------------------------------------------
Protecting your images
If you have a large amount of images on your site someone might decide to link to them and pass it off as their content. Adding this code to your .htaccess will stop them cold in their tracks. On top of that it will redirect the surfer who clicks on their download link to whatever page you wish. The code to put in your .htaccess:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?example\.com [NC]
RewriteCond %{HTTP_REFERER} !^http://YOURIPADDRESS
RewriteRule \.(gif|jpg|jpeg|bmp|png|mpg|mpeg|avi|wmv|mov|asf)$ - [F]
The first "RewriteCond" line specifies that if there is no referrer, that's ok. The second "RewriteCond" specifies that if there is a referrer, it needs to be your domain name. The third line is an additional catch to allow you to use your IP address as well. The "RewriteRule" line denies anyone who breaks the above rules while trying to get a file that ends with one of the listed extensions.
juggernaut is offline   Reply With Quote