.htaccess restrict access folders files

If you like to stop access to files. Then you can do that with .htaccess

Simple type the following in you .htaccess file:

# No access at all!
deny from all

So that is simple. But you can do more.

Like to block someones IP address? 

# block IP

order allow, deny
deny from {IP here in format ##.##.##.##.##}   

Example:

order allow, deny
deny from  66.102.2.2
# This will deny part of Google network :-)
 

Comments

Popular Posts