how to block traffic from single refferer by htaccess

write this code in .htaccess file in your main root directory
#it’s important to note that blocking access by referrer in .htaccess requires the help of the Apache module mod_rewrite to make out the referrer first.
RewriteEngine on
# Options +FollowSymlinks
RewriteCond %{HTTP_REFERER} badsite\.com [NC]
RewriteRule .* – [F]

Blocking users or sites that originate from a particular domain is another useful trick of .htaccess. 
and put there

Easy htaccess tutorials