What is .htaccess file?
The .htaccess file is the local Apache settings file or document that instructs the Apache web server how to work with your website. This guide will shows you how to edit the .htaccess file using the cPanel File Manager.
HOW TO: Edit .htaccess File via the cPanel File Manager
- Firstly, log into your cPanel account.
- Secondly, click on the “File Manager” icon under the “Files” section.
- In the cPanel File Manager, pick out the suitable domain name or folder location, and press the “Go” button.
- Next, 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.
- Then, 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 check 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.
- If the small “Code Editor” window is open, click on the “Edit” button, which will open a new window with options you can edit.
- Lastly, make changes to your .htaccess file and then click on the “Save Changes” button.
Check out the next article on HOW TO: Enable cPanel To Show Hidden Files.