Deny IPs or exclude URLs using .htaccess

There are several reasons to deny specific IP addresses or exclude URLs from your website. For example a traffic intensive Spider  or to reduces grant access to an specific intranet host only. Just to point it out – I use the Adress in this post for practice examples.

Lock out a specific IP address

The IP address obtained when the page is called a 403 (Not Authorized). All other access

Lock out multiple IP addresses

Just write ip addresses to be blocked  to the fileline by line

To Lock out a range of IPs

All addresses correspond to this IP range excluded. In this case to

Allow only specific IP addresses

As described in the Examples all settings work with “allow from” like it does with “deny from“.

Stay tuned!

Leave a Comment