I was getting the below error while adding an IP address from cPanel >> IP Blocker -
DenyIp::adddenyip(xxx.xxx.xxx.xxx) failed: Error: while opening /home/xxx/public_html/.htaccess Error: while opening /home/xxx/public_html/.htaccess
DenyIp::adddenyip(xxx.xxx.xxx.xxx) failed: Error: while opening /home/xxx/public_html/.htaccess Error: while opening /home/xxx/public_html/.htaccess
Solution :-
1. Check if .htaccess file is present under root directory.
2. Check if .htaccess file permission is valid i.e 644.
It should resolve your issue!
2. Check if .htaccess file permission is valid i.e 644.
It should resolve your issue!