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!
Before we get started, it's worth me spending a brief moment introducing myself to you. My name is Mark (or @integralist if Twitter happens to be your communication tool of choice) and I currently work for BBC News in London England as a principal engineer/tech...
The responsibilities taken on by CSS seems to be increasingly blurring with JavaScript. Consider the -webkit-touch-callout
CSS property, which prevents iOS's link dialog menu when you tap and hold a clickable element. The pointer-events
property is even more JavaScript-like, preventing:
click actions from doing...
One event that's always been lacking within the document is a signal for when the user is looking at a given tab, or another tab. When does the user switch off our site to look at something else? When do they come back?
Who is using Apache today? Just kidding. Do you know how to achieve the same using Nginx? Thanks in advance.