Example how to block a city with geoip apache module
SetEnvIf GEOIP_CITY Phoenix BlockRegion
SetEnvIf GEOIP_CITY Farmington BlockRegion
Deny from env=BlockRegion
Allow from 18.104.22.168
Allow from 22.214.171.124
A client needs to get a certain country blocked with .htaccess – or redirected -.
I’m gonna let some links of the solutions here…
Blocking an entire country stops most traffic coming from their IP ranges.
This method isn’t 100% because some countries have slightly overlapping IP ranges.
- Linux IPtable
I suggest *EVERYONE* in server_name to have www.domain.com and domain.com… will look something like this
server_name www.domain.com domain.com;
This solved my problems of typing www.domain2.com and see domain.com etc etc…!