htaccess重定向不允许使用ips

时间:2013-08-04 09:29:30

标签: php .htaccess

我有

<Files ads.php> 
order deny,allow
allow from 46.36.64.0/19
allow from 62.80.224.0/19
allow from 62.128.113.0/27
allow from 62.128.113.32/30
allow from 62.128.113.36/31
allow from 62.128.113.40/30
allow from 62.128.113.48/26
allow from 62.128.113.112/27
allow from 62.128.113.144/29
allow from 62.212.192.0/19
allow from 66.115.179.130/25
allow from 72.32.219.72/29
allow from 77.70.156.0/22
allow from 77.70.160.0/23
allow from 77.70.168.0/23
allow from 77.70.171.0/21
allow from 77.70.179.0/22
allow from 77.70.183.0/24
allow from 77.70.192.0/18
allow from 77.75.40.0/21
allow from 77.79.0.0/18
allow from 77.87.8.0/21
allow from 77.90.64.0/18
allow from 77.94.32.0/26
allow from 77.94.32.64/30
allow from 77.94.32.68/32
allow from 77.94.32.70/26
allow from 77.94.32.134/27
allow from 77.94.32.166/30
allow from 77.94.32.170/31
allow from 77.94.32.174/24
allow from 77.94.33.174/26
allow from 77.94.33.238/28
allow from 77.94.33.254/31
allow from 77.94.35.0/24
deny from all
</Files>

在我的htaccess文件中,我需要将所有拒绝ip的人重定向到index.php。如果不手动将IP重写为大量不同的规则,我怎么能这样做呢?是否有任何htaccess规则,如“如果被拒绝重定向到......”?

0 个答案:

没有答案