#RewriteCond %{HTTP_REFERER} ^http://(www\.)?foobar\.com/ [NC] #RewriteRule \.(jpe?g|gif|bmp|png)$ images/nohotlink.jpg [L]