To protect your htaccess file, we recommend you to block all the unauthorized users to access this file. All you need to follow these steps to access and edit htaccess file.
- First login to your cpanel account.
- Now find the “Files” section and click the “File Manager” icon as shown below.
- Now you need to press the “Settings” button when new page is loaded. It will show you a dialog box as in the image given below.
- You need to check the checkbox “Show Hidden files(dot files)” and press the save button in Dialog box.
- You need to find the File Directory named “.htaccess”.
- Now you need to enter these commands to your .htaccess file.
(# .htaccess protection)
order allow, deny
deny from all