I try to configure a simple block of an IP address in my .htaccess. I followed examples I found here in this forum, that seemed to work fine for other users, but do not work for me and I really don't get why.
My .htaccess file is very simple:
Order Allow,Deny
Allow from all
Deny from aaa.bbb.ccc.ddd
I expect that the configured IP address (aaa.bbb.ccc.ddd) will be blocked. But unfortunately it is not blocked.
If I set 'Deny from all' in the third line of my .htaccess, all access is blocked as expected.
So it seems the directive is read by Apache but if I set anything else but 'from all' i. e. a host name or an IP or an IP wildcard etc. no blocking happens.
I appreciate any help, pointing me in the right direction.
Thanks Nestor
After some search I found because of all clients first allowed and then goes to be denied htaccess not work correctly.I reverse deny and allow in .htaccess But finally Solved in this way :
Following ip forbidden 403 and others allowed for browsing. (No Directory tag needed if .htaccess is in current direcotry)
Hope to be helpful