ไปหาข้อมูลมาน่าจะทำที่ .htaccess นะครับ แต่ผมยังไม่ค่อยเข้าใจ ใครช่วยเพิ่มเติมทีครับ
ตามนี้ครับ
http://www.webhostingtalk.com/showthread.php?t=1017566
และก็นี่
http://munkyonline.co.uk/articles/htaccess-301-redirects-for-ip-ranges
เค้าพูดกันประมาณนี้
I want to redirect to all the visitors form a particular IP range to another URL.
I am not able to integrate the redirect code into my existing .htaccess.
My Current .htaccess is:
Options -Indexes
ErrorDocument 404 /
ErrorDocument 403 /
ErrorDocument 500 /
RewriteEngine On
RewriteRule ^.*/.*\.htm$ 404.php [L]
RewriteRule ^([^\.]*)?\.htm$ index.php?name=$1 [NC,L]
RewriteRule .* - [E=HTTP_IF_MODIFIED_SINCE:%{HTTP:If-Modified-Since}]
RewriteRule .* - [E=HTTP_IF_NONE_MATCH:%{HTTP:If-None-Match}]
RewriteRule ^images/e/(.*)$ http://thumbs.ebaystatic.com/pict/$1 [R,L]
RewriteRule ^item-(.*)_(.*)_(.*)_(.*).html$ auction.php?title=$1&item=$2&country=$3&ccid=$4
RewriteRule ^item-(.*)_(.*)_(.*).html$ auction.php?title=$1&item=$2&country=$3
RewriteRule ^item-(.*)_(.*).html$ auction.php?title=$1&item=$2
The IP range to be banned is:
<Limit GET HEAD POST>
order allow,deny
# Country: JAPAN
# ISO Code: JP
# Total Networks: 2,428
# Total Subnets: 187,283,712
deny from 1.21.0.0/16
deny from 1.33.0.0/16
deny from 1.66.0.0/15
deny from 1.72.0.0/13
deny from 1.112.0.0/14
#
allow from all
</Limit>
How to integrate this IP range code in existing Htaccess then redirect the visitor form this IP range, ensuring there is no conflict with exiting .htaccess?
Cheers