title: htaccess deny all IP refers
body: <p>My website is getting bombarded with requests that are referred from an IP address.</p>
  
  <blockquote>
    <p>[Sat Dec 14 22:03:14 2013] [error] [client XXX.XX.XX.XX] client denied
    by server configuration: /home/user/public_html/folder/folder/,
    referer: <a href="http://XXX.XXX.XXX.XXX/" rel="nofollow">http://XXX.XXX.XXX.XXX/</a></p>
  </blockquote>
  
  <p>You see the referrer isn't a domain name like a legit refer would be, instead it's from an IP and it bombards my website thousands of times. I have blocked the IP address and similar ones like this:</p>
  
  <pre><code>RewriteCond %{HTTP_REFERER} XXX\.XXX\.XXX [NC]
  RewriteRule .* - [F] 
  </code></pre>
  
  <p>But how can I block all referrers coming from an IP address? As far as my website is concerned the vast majority if not every single user will visit my site from a domain refer not IP address. Only a visitor with malicious intent will come vis IP refer as I am experiencing now.</p>
  
  <pre><code>RewriteCond %{HTTP_REFERER} *\.*\.* [NC]
  RewriteRule .* - [F] 
  </code></pre>
  
  <p>I tried this thinking it would work but it doesn't. I thought maybe this would be a wild card for each set of digits. But it gave a large amount of errors in the logs... </p>