Question
Is it possible to block access to website for specific locations through .htaccess
file in Plesk?
Answer
It only possible to limit access for specific IP addresses added item by item to the .htaccess
file, but not to the whole country.
- Get list of IP addresses that are needed to be blocked.
- Create .htaccess file through Plesk > Domains > example.com > File Manager > New > Create File:
- Open the created file and add the following lines:
order deny,allow
deny from <IP address from the list>
deny from <IP address from the list>
deny from <IP address from the list>
allow from all