Jump to content

Block A Ip Address From Your Site


Recommended Posts

If you need to block an IP address from accessing a directory on your site, place the following into an .htaccess file located in the directory you wish to block their access from:

 

Order Allow,Deny

Allow from all

Deny from 111.111.111.111

 

Replace 111.111.111.111 with the IP you wish to block.

 

If you need to block more than one ip:

Order Allow,Deny

Allow from all

Deny from 111.111.111.111

Deny from 222.222.222.222

 

or:

Order Allow,Deny

Allow from all

Deny from 111.111.111.111 222.222.222.222

 

 

If you wish to deny access to an entire block of IPs, only give a portion of the IP:

Order Allow,Deny

Allow from all

Deny from 111.111

 

 

__________________

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...