For example, in the .htaccess file in the root of my website, I have this:
<Limit GET>
order allow,deny
allow from all
deny from 195.93.34.11
deny from 200.146.106.74
deny from 80.69.48.
deny from 217.107.222.16
deny from 85.255.113.
</Limit>
ErrorDocument 403 http://google.com/
When you leave the last part of the IP address off, it acts as a wildcard. So for example, anyone coming from 85.255.113.1 to 85.255.113.255 would be redirected to the Error 403 page I selected. I do this, and I never hear from the spammer again.