国外网站经常封闭中国的ip访问,经一番查找,发现只要修改网站目录下的.htaccess文件就可以达到目的。
那如果把中国的IP地址换成小日本的呢?
RewriteEngine On
RewriteCond %{REMOTE_ADDR} ^139.175.(.*)$ [OR]
RewriteCond %{REMOTE_ADDR} ^168.95.(.*)$ [OR]
RewriteCond %{REMOTE_ADDR} ^61.(.*)$ [OR]
RewriteCond %{REMOTE_ADDR} ^218.(.*)$ [OR]
RewriteCond %{REMOTE_ADDR} ^202.(.*)$ [OR]
RewriteCond %{REMOTE_ADDR} ^203.(.*)$ [OR]
RewriteCond %{REMOTE_ADDR} ^210.(.*)$ [OR]
RewriteCond %{REMOTE_ADDR} ^211.(.*)$
RewriteCond %{REMOTE_ADDR} !^202.60.132.55$
RewriteCond %{REMOTE_ADDR} !^210.0.[0-9].(.*)$
RewriteCond %{REMOTE_ADDR} !^210.0.[1-9][0-9].(.*)$
RewriteCond %{REMOTE_ADDR} !^210.0.1[0-1][0-9].(.*)$
RewriteCond %{REMOTE_ADDR} !^210.0.12[0-7].(.*)$
RewriteCond %{REMOTE_ADDR} !^210.4[8-9].(.*)$
RewriteCond %{REMOTE_ADDR} !^210.5[0-5].(.*)$
RewriteCond %{REMOTE_ADDR} !^210.[7-9].(.*)$
RewriteCond %{REMOTE_ADDR} !^210.1[0-1].(.*)$
RewriteCond %{REMOTE_ADDR} !^210.2[3-4].(.*)$
RewriteCond %{REMOTE_ADDR} !^211.2[5-9].(.*)$
RewriteCond %{REMOTE_ADDR} !^211.31.(.*)$
RewriteCond %{REMOTE_ADDR} !^203.[1-9].(.*)$
RewriteCond %{REMOTE_ADDR} !^203.[1-9][0-9].(.*)$
RewriteCond %{REMOTE_ADDR} !^203.1[0-1][0-9].(.*)$
RewriteCond %{REMOTE_ADDR} !^203.134.[0-9].(.*)$
RewriteCond %{REMOTE_ADDR} !^203.134.[1-9][0-9].(.*)$
RewriteCond %{REMOTE_ADDR} !^203.134.1[1-9][0-9].(.*)$
RewriteCond %{REMOTE_ADDR} !^203.134.2[1-4][0-9].(.*)$
RewriteCond %{REMOTE_ADDR} !^203.134.25[0-1].(.*)$
RewriteCond %{REMOTE_ADDR} !^202.[0-9].(.*)$
RewriteCond %{REMOTE_ADDR} !^202.10.(.*)$
RewriteCond %{REMOTE_ADDR} !^202.20.[0-9].(.*)$
RewriteCond %{REMOTE_ADDR} !^202.20.[1-7][0-9].(.*)$
RewriteCond %{REMOTE_ADDR} !^202.20.8[0-1].(.*)$
RewriteCond %{REMOTE_ADDR} !^202.21.[8-9].(.*)$
RewriteCond %{REMOTE_ADDR} !^202.21.[1-9][0-9].(.*)$
RewriteCond %{REMOTE_ADDR} !^202.21.[1-9][1-9][0-9].(.*)$
RewriteCond %{REMOTE_ADDR} !^202.22.[0-9].(.*)$
RewriteCond %{REMOTE_ADDR} !^202.27.(.*)$
RewriteCond %{REMOTE_ADDR} !^202.129.6[4-9].(.*)$
RewriteCond %{REMOTE_ADDR} !^202.129.[7-9][0-9].(.*)$
RewriteCond %{REMOTE_ADDR}