B
B
Barmunk2012-08-15 08:43:30
PHP
Barmunk, 2012-08-15 08:43:30

Blocking a site by country, how?

Tell me please. It is necessary to prohibit access to the site to all countries except Russia and the CIS. How can this be done? Ideally, when visiting a site from Europe, a person should be redirected to another domain.

Engine on php + mysql, server on apache + nginx

Answer the question

In order to leave comments, you need to log in

4 answer(s)
W
WildZero, 2012-08-15
@WildZero

geoip and redirect unwanted countries.

M
MicRaiS, 2012-08-15
@MicRaiS

i once used this mycrimea.su/partners/web/access/

U
under_construction, 2012-08-15
@under_construction

use, for example, geobaza.ru/ru/download/ to determine the country by ip-address
api on php implemented

V
Viktorozorro, 2017-08-30
@Viktorozorro

A big request, help set up a redirect and country blocking through .htaccess.
I tried this code, after applying the error 500 was received ...
GeoIPEnable On
SetEnvIf GEOIP_COUNTRY_CODE CN BlockCountry
Deny from env=BlockCountry
(CN - China)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question