PDA

View Full Version : How to prevent bandwidth thieves


DaveTomneyUK
Fri 6th Jul '07, 5:46pm
Hi,

I have been working on this code for ages and finally got it working and its been tested and I would like to share it will everyone to stop bandwidth thieves.

create a .htaccess file and add the below code.

<IfModule mod_rewrite.c>
RewriteEngine On

# block image bandwidth thieves
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.|sub1\.|sub2\.)?yoursite\.com(/) [NC]
RewriteRule .*\.(jpe?g|gif|bmp|png)$ /images/nolink.jpe [L,NC]

# block file bandwidth thieves
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.|sub1\.|sub2\.)?yoursite\.com(/) [NC]
RewriteRule .*\.(swf|mp3|wmv|zip)$ http://yoursite.com [R=301,L,NC]
</IfModule>

XtAzY
Fri 6th Jul '07, 6:13pm
Hi,

I have been working on this code for ages and finally got it working and its been tested and I would like to share it will everyone to stop bandwidth thieves.

create a .htaccess file and add the below code.

<IfModule mod_rewrite.c>
RewriteEngine On

# block image bandwidth thieves
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.|sub1\.|sub2\.)?yoursite\.com(/) [NC]
RewriteRule .*\.(jpe?g|gif|bmp|png)$ /images/nolink.jpe [L,NC]

# block file bandwidth thieves
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.|sub1\.|sub2\.)?yoursite\.com(/) [NC]
RewriteRule .*\.(swf|mp3|wmv|zip)$ http://yoursite.com [R=301,L,NC]
</IfModule>

Nice! But is there a way to prevent download accelerators from abusing the attachments?

DaveTomneyUK
Fri 6th Jul '07, 6:33pm
only from other sites not your own unless you add a random image like when new people register.

jawatkin
Fri 6th Jul '07, 6:53pm
Keep in mind that this solution will block out Google/other spiders from indexing your images, as well.

wurkanimal
Fri 6th Jul '07, 7:23pm
Thanks you!

waterwheel
Wed 18th Jul '07, 7:06pm
Hi,

I have been working on this code for ages and finally got it working and its been tested and I would like to share it will everyone to stop bandwidth thieves.

create a .htaccess file and add the below code.

<IfModule mod_rewrite.c>
RewriteEngine On

# block image bandwidth thieves
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.|sub1\.|sub2\.)?yoursite\.com(/) [NC]
RewriteRule .*\.(jpe?g|gif|bmp|png)$ /images/nolink.jpe [L,NC]

# block file bandwidth thieves
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.|sub1\.|sub2\.)?yoursite\.com(/) [NC]
RewriteRule .*\.(swf|mp3|wmv|zip)$ http://yoursite.com [R=301,L,NC]
</IfModule>

I added this to my .htaccess file and it didn't work. I put it in my forum's root folder, is that correct or should it go in a different directory?

I hotlinked an image on my myspace page and showed up no problem. What's the catch. This is the third or fourth time I've tried to get something like this working and no luck. I'm just over 200 gigs a month on my site, and I'd like to get that number down asap.

Is it just me or does this seem like something that vB should integrate into the software?