How to Block a Range of IP Addresses
As much as content creators want traffic to their website, there is such thing as the wrong type of traffic. Sometimes it's content scrapers, sometimes it's malicious bots; either way, it's important to know how to block problematic IPs from your site.
To block a range of IP addresses using an .htaccess
file, you can use the *
wildcard for pieces of the IP address:
Order Allow,Deny
Deny from 219.198.*.*
Allow from all
You can also use a regular expression:
RewriteEngine on
RewriteCond %{REMOTE_ADDR} ^219\.198\.\.
RewriteRule ^ - [F]
Don't let known attackers and problematic bots bring your website to a halt! Be quick to check your site logs and ban addresses that are causing havoc!
With CSS border-radius, I showed you how CSS can bridge the gap between design and development by adding rounded corners to elements. CSS gradients are another step in that direction. Now that CSS gradients are supported in Internet Explorer 8+, Firefox, Safari, and Chrome...
I remember the early days of JavaScript where you needed a simple function for just about everything because the browser vendors implemented features differently, and not just edge features, basic features, like addEventListener
and attachEvent
. Times have changed but there are still a few functions each developer should...
Another reason that I love Twitter so much is that I'm able to check out what fellow developers think is interesting. Chris Coyier posted about a flashlight effect he found built with jQuery. While I agree with Chris that it's a little corny, it...
Who is using Apache today? Just kidding. Do you know how to achieve the same using Nginx? Thanks in advance.