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.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 03-25-2005, 09:08 AM   #1
chowda
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.
chowda is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-25-2005, 09:11 AM   #2
Fabuleux
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
__________________

Last edited by Fabuleux; 03-25-2005 at 09:13 AM..
Fabuleux is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-25-2005, 09:15 AM   #3
HarlotCash Dyker
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
__________________
!!!Harlot Cash<<>>Harlot Cash<<>>Harlot Cash<<>>Harlot Cash!!!

Last edited by HarlotCash Dyker; 03-25-2005 at 09:17 AM..
HarlotCash Dyker is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-25-2005, 09:16 AM   #4
Fabuleux
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.
__________________
Fabuleux is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-25-2005, 09:19 AM   #5
mrthumbs
salad tossing sig guy
 
mrthumbs's Avatar
 
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.
mrthumbs is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-25-2005, 09:21 AM   #6
chowda
Confirmed User
 
Join Date: Jun 2003
Location: Gooch city
Posts: 9,527
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
__________________
Someone finds you...
2007

PS: Nationalnet is the best host I've ever had. And i tried alot of them.
chowda is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-25-2005, 10:42 AM   #7
Fuckin Bill
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.
Fuckin Bill is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-25-2005, 02:07 PM   #8
tre sandman
Confirmed User
 
Join Date: Mar 2005
Location: trash can
Posts: 113
http://www.tgpsoftware.com/features.html
__________________
tre sandman is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.