GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   How to country ban using htaccess? (https://gfy.com/showthread.php?t=448232)

chowda 03-25-2005 09:08 AM

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?

Fabuleux 03-25-2005 09:11 AM

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

HarlotCash Dyker 03-25-2005 09:15 AM

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

Fabuleux 03-25-2005 09:16 AM

Redirecting on browser language can be good since I don't think a lot a Chineese people use an English browser.

mrthumbs 03-25-2005 09:19 AM

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.

chowda 03-25-2005 09:21 AM

Quote:

Originally Posted by Fabuleux
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

well i do have their ip addresses right now, and i dont mind the hotlinking, but not from hk and china.
actually lookin at my stats, i have their whole ip block. :D

Fuckin Bill 03-25-2005 10:42 AM

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.

tre sandman 03-25-2005 02:07 PM

http://www.tgpsoftware.com/features.html


All times are GMT -7. The time now is 04:10 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123