How can I block access to my website to an entire country

The reason the .htaccess file is deleted is because it exceeds the 10 kB file size limit. Some suggestions on working around this for country blocking is described here: