To Edit .htaccess File via the cPanel File Manager follow the below steps –
1. Log into your cPanel account.
2. Click on the “File Manger” icon in the “Files” area.
3. cPanel File Manager will be open, pick out the suitable domain name or folder location, and press the “Go” button.
4. Browse to the folder where your file .htaccess file is located. To edit your root directory’s .htaccess file, go to the public_html folder.
5. Click on the “Settings” button in the File Manager if the .htaccess file does not display. On the right side of the top menu, you can discover the “Settings” button. There’s going to open a new small window. Click on the “Save” button to select the “Show Hidden Files (Dotfiles)” option. You will be able to see the .htaccess file. Create a new one if it doesn’t exist.
6. Right click on the .htaccess file and after that on “Edit” in the Context Menu.
7. If the small “Code Editor” window is open, click on the “Edit” button, which will open a new window with options you can edit.
8. Make changes to your .htaccess file and then click on the “Save Changes” button.