Log into your cPanel account.
In the “Files” section find “File Manager” and click on it.
Click “Document Root for:” then choose the domain name which you wish to access.
Be sure that “Show Hidden Files (dotfiles)” is checked.
Click on the “Go” button.
We are searching .htaccess file among all the files.
You can right click on the file then choose “Code Edit” on the menu or click on the .htaccess file icon then click on the “Code editor” at the top of the page.
After that, will appear a dialogue box which will ask you about encoding. Here you can just click on the “Edit” button to continue.
In the new window will be opened an editor where you should edit the file as needed.
When you have done all the changes you need to save the document.
INFO: after the file is saved we recommend you to test your site. Make sure it is working correctly, but if not, you can correct errors or restore a working version of the site.
If it works correctly just close the window.
That is all!