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 06-30-2005, 11:25 PM   #1
Blackrose
Confirmed User
 
Join Date: Aug 2001
Location: Carnal City
Posts: 344
need help in blocking access per country

can you guys help me please? i need to block a couple of countries from accessing my sites. How do i do it with .htaccess? also, where can i find all the possible ip's assigned to a country?

thanks in advance
__________________
The die is cast...
The dice are rolled...
You look like shit...
I feel like gold
-- Uh, me?
Blackrose is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-30-2005, 11:41 PM   #2
Blackrose
Confirmed User
 
Join Date: Aug 2001
Location: Carnal City
Posts: 344
bump for me
__________________
The die is cast...
The dice are rolled...
You look like shit...
I feel like gold
-- Uh, me?
Blackrose is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-01-2005, 12:18 AM   #3
okdesign
ICQ 278367136
 
okdesign's Avatar
 
Industry Role:
Join Date: May 2002
Posts: 24,773
that is bad idea!
okdesign is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-01-2005, 02:37 AM   #4
Blackrose
Confirmed User
 
Join Date: Aug 2001
Location: Carnal City
Posts: 344
why? please explain ... do you want to waste BW on countries where 90%+ of the population doesnt have CC ?
__________________
The die is cast...
The dice are rolled...
You look like shit...
I feel like gold
-- Uh, me?
Blackrose is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-01-2005, 02:52 AM   #5
darksoul
Confirmed User
 
darksoul's Avatar
 
Join Date: Apr 2002
Location: /root/
Posts: 4,997
www.maxmind.com
__________________
1337 5y54|)m1n: 157717888
BM-2cUBw4B2fgiYAfjkE7JvWaJMiUXD96n9tN
Cambooth
darksoul is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-01-2005, 06:12 AM   #6
Lycanthrope
Confirmed User
 
Lycanthrope's Avatar
 
Industry Role:
Join Date: Jan 2004
Location: Wisconsin
Posts: 4,517
Aye, get a database from Maxmind. The free one is decent, but the paid versions are obviously better.
I wouldn't just block them. Redirect them somewhere, (dialer, or AFF or something.) where you might at least have a chance at getting something out of them.

Simply add:

GeoIPEnable On
GeoIPDBFile /path/to/GeoIP.dat

RewriteEngine on
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^XX$
RewriteRule ^(.*)$ http://www.shitcountry.url [L]

XX would be replaced by the code for the country in question. If redirecting numerous countries to the same URL don't forget to add [OR] after each RewriteCond statement EXCEPT for the last one. If redirecting numerous countries, each to different locations, you'll need one RewriteCond statement AND RewriteRule for each.
__________________
Lycanthrope is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-01-2005, 06:16 AM   #7
nojob
The Original NoJob
 
nojob's Avatar
 
Join Date: Feb 2004
Location: Jerzzey
Posts: 3,682
Quote:
Originally Posted by Lycanthrope
Aye, get a database from Maxmind. The free one is decent, but the paid versions are obviously better.
I wouldn't just block them. Redirect them somewhere, (dialer, or AFF or something.) where you might at least have a chance at getting something out of them.

Simply add:

GeoIPEnable On
GeoIPDBFile /path/to/GeoIP.dat

RewriteEngine on
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^XX$
RewriteRule ^(.*)$ http://www.shitcountry.url [L]

XX would be replaced by the code for the country in question. If redirecting numerous countries to the same URL don't forget to add [OR] after each RewriteCond statement EXCEPT for the last one. If redirecting numerous countries, each to different locations, you'll need one RewriteCond statement AND RewriteRule for each.
Thanks for the post.
nojob is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-01-2005, 06:26 AM   #8
colpanic
Confirmed User
 
Join Date: May 2004
Location: San Diego, CA
Posts: 1,007
Hey. List the countries here & maybe we can work something out.

I've got some uses for foreign adult traffic (European specifically).

T
__________________
I like ducks.
colpanic is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-02-2005, 04:40 AM   #9
Blackrose
Confirmed User
 
Join Date: Aug 2001
Location: Carnal City
Posts: 344
Lycanthrope big thanks for this one ...
__________________
The die is cast...
The dice are rolled...
You look like shit...
I feel like gold
-- Uh, me?
Blackrose 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.