To edit the .htaccess file, first we will open the File Manager:
1. Login to cPanel.
2. Click on "File Manager" in the "Files" section.
3. Go to Settings and select "Document Root for:" and select the domain name you wish to access.
Make sure "Show Hidden Files (dotfiles)" is checked.
4. Click the "Save" button.
The File Manager will open in a new tab or window.
A dialogue box may appear asking you about encoding. Just click on the "Edit" button to continue.
The editor will open in a new window.
Click on the "Save Changes" button in the upper right-hand corner when done.
The changes have been saved. Test your website to make sure it has the desired effect. If not, correct the error or revert back to the previous version until your site works again.
Once complete, you can click "Close" to close the window.