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)
-   -   need help in blocking access per country (https://gfy.com/showthread.php?t=487264)

Blackrose 06-30-2005 11:25 PM

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

Blackrose 06-30-2005 11:41 PM

bump for me :)

okdesign 07-01-2005 12:18 AM

that is bad idea!

Blackrose 07-01-2005 02:37 AM

why? please explain ... do you want to waste BW on countries where 90%+ of the population doesnt have CC ?

darksoul 07-01-2005 02:52 AM

www.maxmind.com

Lycanthrope 07-01-2005 06:12 AM

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.

nojob 07-01-2005 06:16 AM

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.

colpanic 07-01-2005 06:26 AM

Hey. List the countries here & maybe we can work something out.

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

T

Blackrose 07-02-2005 04:40 AM

Lycanthrope big thanks for this one ...


All times are GMT -7. The time now is 11:27 PM.

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