[support] Stopping bandwidth-leeching from MySpace

Cameron Barrett camworld at camworld.com
Wed Sep 13 18:56:34 UTC 2006


One of my clients running an online community on top of Drupal is reporting
that nearly 40% of their monthly bandwidth is used up by MySpace
bandwifth-leechers.

If the leechers on MySpace were linking directly to a JPG, GIF, etc. I would
know how to stop this using .htaccess

RewriteEngine On
RewriteCond %{HTTP_REFERER} ^http://(.+\.)?myspace\.com/ [NC,OR]
RewriteRule .*\.(jpe?g|gif|bmp|png)$ - [F]

But the problem is this particular Drupal installation uses the img_assist
module which renders images like so:

http://www.domain.com/img_assist/gen/1350

With no file suffix, which is required in the above .htaccess Rewrite
example.

Can someone help me with the correct regex for blocking bandwidth leeching
for images rendered directly from the img_assist module.

Thanks,

Cameron Barrett
http://www.camworld.com




More information about the support mailing list