I'm not an expert in these matters - but I did have a similar problem a few years ago and used the code below... but if I remember when researching - it was a different syntax dependent upon the server setup:
Code:
RewriteEngine On
RewriteCond %{HTTP_REFERER} ^http://(.+\.)?altlab\.com/ [NC]
RewriteRule .*\.(jpe?g|gif|bmp|png)$ nohotlink.gif [L]