Popular Posts

How to use .htaccess Part 2: Allow/Deny Certain IP Addresses


In some situations, you may want to allow people with specific IP addresses to access your site, or you may want to ban certain IP addresses. This will work only if you know IP addresses you want to ban or allow.

You can block an IP address by using:
deny from 000.000.000.000.

If you only specifiy 1 or 2 of the groups of numbers, you will block a whole range.

You can also allow an IP addresses by using:
allow from 000.000.000.000.

If you want to deny everyone from accessing a directory, you can use:
deny from all
but this will still allow scripts to use the files in directory.


How to use .htaccess Part 2: Allow/Deny Certain IP Addresses How to use .htaccess Part 2: Allow/Deny Certain IP Addresses Reviewed by Snehal Vasava on May 20, 2018 Rating: 5

No comments:

Breaking

Powered by Blogger.