Linux系统虚拟主机通过PHP程序代码限制IP访问
order allow,deny
# 禁止一个ip地址
deny from 192.168.108.1
# 禁止一个ip地址
deny from 192.168.108.1
# 禁止一个ip段
deny from 192.168.108.0/255
deny from 192.168.108.0/255
#允许一个ip段
allow from 192.168.108.0/255
# 或者你需要在这ip段中允许部分ip
allow from 192.168.108.99
allow from 192.168.108.99
# 除此之外一切均可以访问
allow from all
allow from all