2012-07-16 194 views
0

我想阻止除了我的文萊以外的所有國家。該域.bnhtaccess允許國家域名

<Limit GET POST PUT> 
order deny,allow 
deny from all 
allow from .bn 
allow from *.bn 
allow from *.*.bn 
allow from *.*.*.bn 
</Limit> 

我的姓名地址:smp-85-139.simpur.net.bn所以我相信下面的代碼工作:

allow from *.*.*.bn 

但我仍然有被禁止訪問。這裏有什麼遺漏嗎?


我試着用IP,但仍受阻..

<Limit GET POST PUT> 
order deny,allow 
deny from all 
allow from 202.152.*.* 
</Limit> 

我的IP是202.152.85.139


UPDATE: 它出現在我的虛擬主機是使用nginx的所以這個設置如果我是對的,根本不會工作。

回答

1

這裏是文萊達魯薩蘭國的.htaccess允許清單,由Country IP Blocks提供。數據是正確的,截至4月20日13時爲止。

如果您的託管公司允許您使用的.htaccess您可以複製並粘貼下面的數據到.htaccess文件,並將其加載到你的根:

<Limit GET POST> 
order deny,allow 
allow from 61.6.192.0/18 
allow from 103.4.188.0/22 
allow from 103.12.208.0/23 
allow from 103.16.120.0/22 
allow from 103.17.24.0/22 
allow from 103.18.172.0/22 
allow from 103.20.24.0/22 
allow from 118.103.248.0/21 
allow from 119.160.128.0/18 
allow from 156.31.0.0/16 
allow from 158.161.0.0/16 
allow from 192.94.122.0/24 
allow from 202.12.26.0/24 
allow from 202.59.230.0/24 
allow from 202.90.36.0/24 
allow from 202.93.208.0/20 
allow from 202.152.64.0/19 
allow from 202.160.0.0/19 
allow from 202.160.32.0/20 
deny from all 
</Limit>