![]() |
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 |
bump for me :)
|
that is bad idea!
|
why? please explain ... do you want to waste BW on countries where 90%+ of the population doesnt have CC ?
|
|
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. |
Quote:
|
Hey. List the countries here & maybe we can work something out.
I've got some uses for foreign adult traffic (European specifically). T |
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