|
|
|
||||
|
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() |
|
|||||||
| Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
|
Thread Tools |
|
|
#1 |
|
Confirmed User
Join Date: Jun 2003
Location: Gooch city
Posts: 9,527
|
How to country ban using htaccess?
I need to ban hong kong and china hotlinkers.. since they are no use to me.
so how do i redirect these contries specifically?
__________________
Someone finds you... 2007 PS: Nationalnet is the best host I've ever had. And i tried alot of them. |
|
|
|
|
|
#2 |
|
Confirmed User
Join Date: May 2003
Location: The Netherlands
Posts: 2,543
|
I don't think that's really simple. You need some program that can lookup the IP number in a little database to see which country the visitor is coming from.
Maybe this is something for you: http://nibbi.net/scripts/ip-filter.php |
|
|
|
|
|
#3 |
|
Confirmed User
Join Date: Sep 2003
Location: At a whorehouse near you
Posts: 1,828
|
hing like this?
RewriteEngine On RewriteCond %{REMOTE_HOST} ^.*\.hk$ [OR] RewriteCond %{HTTP:Accept-Language} ^hk.*$ RewriteRule .* http://www.page-to-send-them-to.com/index.htm [R] Deny from .cn |
|
|
|
|
|
#4 |
|
Confirmed User
Join Date: May 2003
Location: The Netherlands
Posts: 2,543
|
Redirecting on browser language can be good since I don't think a lot a Chineese people use an English browser.
|
|
|
|
|
|
#5 |
|
salad tossing sig guy
Join Date: Apr 2002
Location: mrthumbs*gmail.com
Posts: 11,702
|
yup only way to ban them is determining location on browser language.. depending on the country you are planning to ban that only 50-90% accuracy (90% chinese for example and 50% if you plan to ban a european country).
Other than that only geo-ip can help you. |
|
|
|
|
|
#6 | |
|
Confirmed User
Join Date: Jun 2003
Location: Gooch city
Posts: 9,527
|
Quote:
actually lookin at my stats, i have their whole ip block. :D
__________________
Someone finds you... 2007 PS: Nationalnet is the best host I've ever had. And i tried alot of them. |
|
|
|
|
|
|
#7 |
|
Confirmed User
Join Date: Feb 2003
Posts: 1,020
|
If you have the IPblock, you can just use a deny statement in the .htaccess. Just put in the first 2 numbers or first 3 of the ip.
<Limit GET POST> order Allow,Deny Deny from XXX.XXX. Allow from all </Limit> That'll drop the traffic completely and won't use the extra resources needed my mod-rewrite to redirect them or check for language or any of that stuff. |
|
|
|
|
|
#8 |
|
Confirmed User
Join Date: Mar 2005
Location: trash can
Posts: 113
|
|
|
|
|