One good tutorial can be found from https://blog.paranoidpenguin.net/2017/12/malicious-bots-sending-site-ru-as-the-http-referer/
An another good reply can be found from https://stackoverflow.com/questions/25477342/blocking-semalt-referrers-with-htaccess-rules/25582471
RewriteCond %{HTTP_REFERER} site\.ru [NC]
RewriteRule ^(.*)$ - [L,R=403]
Read also: Bad IP adresses