htaccess does not work for LAN IP (192.168.)

laluvirtual

Member
Aug 31, 2006
24
0
151
I want to allow local ip address (192.168.10.*) only and deny all local ip (192.168.*.*) and deny all public ip by this htaccess but why it doesn't work?

Code:
order deny,allow
deny from all
allow from 192.168.10.
that htaccess code block all local and public ip and not allow 192.168.10.* | Why?


thanks
Best Regards
 
Last edited:

webignition

Well-Known Member
Jan 22, 2005
1,880
0
166
Yep, this just seems to be the way Apache works.

Try Googling some related terms and you'll find you're not the only one to encounter such issues. Doing so should also find you one or more possible solutions.

You could give the following a go:

Code:
order allow,deny
allow from env=is_internal
deny from all