Solution to reject access to an IP site

  
                  

For some reason, I don't want a fixed IP owner to visit my website. What should I do?

A: If you don't want an IP to access the contents of the site, you can reject the IP by adding it to the .htaccess. For example:

order allow,deny
deny from 210.10.56.32
deny from 219.5.45.
allow from all

The second line rejects an IP, Three lines reject an IP segment, which is 219.5.45.0~219.2.45.255

Want to reject everyone? It's good to use deny from all. Not only with IP, but also with domain names.

Copyright © Windows knowledge All Rights Reserved