Jump to content

.htaccess for block IP address


ivanhoe_h

Recommended Posts

Please can someone help. I am a new member and in need of some expert help.

 

I have recently started to get some annoying visitors to my site who seem to browse every page and then request live chats with threatening behaviour. I decided enough was enough and have attempted to block their IP address using .htaccess but it wont work.

 

The code I have used is as follows

 

 

Order allow, deny

Deny from xx.xxx.xx.x (not sure its wise to show the actual IP address online ??)

Allow from all

 

 

This is saved as .htaccess and is in the root folder on my webserver. It is set to UTF-8.

 

Am I doing something wrong?

 

Thanks

 

Ivan

Link to comment
Share on other sites

try this syntax, may be work, but also if there is another role in server's config file and if "Allow overwrite" is set "off" nothing will happen.

 

 

Order Allow,Deny

Allow from all

Deny from 192.168.0.1

 

 

Please can someone help. I am a new member and in need of some expert help.

 

I have recently started to get some annoying visitors to my site who seem to browse every page and then request live chats with threatening behaviour. I decided enough was enough and have attempted to block their IP address using .htaccess but it wont work.

 

The code I have used is as follows

 

 

Order allow, deny

Deny from xx.xxx.xx.x (not sure its wise to show the actual IP address online ??)

Allow from all

 

 

This is saved as .htaccess and is in the root folder on my webserver. It is set to UTF-8.

 

Am I doing something wrong?

 

Thanks

 

Ivan

Link to comment
Share on other sites

That looks correct. Are you sure you are using the correct IP address?

 

Also, if you are on a Windows-based server for some reason, keep in mind that .htaccess files won't work.

 

 

That could be the answer then, we are running on a Windows server as we are using ASP.net pages.

 

Is there any other options?

Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

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.

Loading...
×
×
  • Create New...