What is .htaccess file?
The local Apache settings file or document, known as the.htaccess file, tells the Apache web server how to interact with your website. This tutorial will demonstrate using the cPanel File Manager how to edit the.htaccess file.
How to Edit .htaccess File via the cPanel FileManager
- 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.
- If the.htaccess file does not appear, then click the “Settings” option in the File Manager. The “Settings” button may be found on the top menu’s right side. A brand-new tiny window will appear. To enable “Show Hidden Files (Dotfiles),” click the “Save” button. The.htaccess file will be visible to you. If one doesn’t already exist, make one.
- 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.