i have made this in online Htaccess generator but it working fine with the
PHP Code:
http://www.planetbh.com 
refere but its not working whin refering from
PHP Code:
http://dev.planetbh.com 
any hint please

PHP Code:
RewriteEngine on
RewriteCond 
%{HTTP_REFERER} !^http://(www\.)?planetbh.com(/)?.*$     [NC]
RewriteCond %{HTTP_REFERER} !^http://()?http:/dev.planetbh.com(/)?.*$     [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp|rar|exe|zip)$ http://planetbh.com/vb [R,NC]