Click to See Complete Forum and Search --> : Problems with people stealing bandwidth
thciskey
05-31-2005, 05:05 PM
I own a site filled with multimedia. All coded in ASP. Problem im having is that sometimes people are linking directly to the .wmv file on the site basically exausting my bandwidth. I need them to be coming to the page that the files is being played on. For example I want people to gotohttp://www.lesscrappy.com/moviepage.asp?ID=173 (http://www.lesscrappy.com/moviepage.asp?ID=173) rather than the actual file on my server because the banner ads pay for my serving fees which are pretty big now. Is there anyway to ban people from directly accessing the .wmv's.
TIA
Jeff
www.lesscrappy.com (http://www.lesscrappy.com)
Ravasz
05-31-2005, 09:52 PM
I'm pretty sure .htaccess can be modified to prevent direct linking to any file extension. I use it to protect my graphics, but I think it can be used for media files as well:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yourdomain.com.*$ [NC]
RewriteRule ^.+\.(jpg|gif|wmv)$
...would be something like that.
I edited it a bit, but that's what I've had working for me. Those smarter than I can correct it if they see fit.
Frozen Peas
06-02-2005, 02:41 AM
Using an anti-leech script such as this one: http://www.hotscripts.com/Detailed/19407.html will help you. That one is written in ASP. It is actually written to prevent image leeching, but it's pretty straight forward and you'll be able to modify it to suit your needs.