开发者

.htaccess block local ip address

I have 3 applications running on wampserver hosted on our intranet.

I would like to block the access of applications for a certain ip range. So I edited .htaccess files for each 开发者_JAVA技巧application as below. But the application is not blocked.

order deny,allow allow from 10.212.4. deny from all

After checking the logs I found that the ip address the client returning was different. Since all our machines use proxy settings by default.

Anyone could help me how to over come this ?


You can use mod_rewrite to block people based on their "x-forwarded-for" header. I would not consider this secure though, because these are easy to forge.

See the discussion here:

http://www.110mb.com/forum/empty-t26129.0.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜