Locating and editing the ‘.htaccess’ file
The .htaccess file is used to make adjustments to how your hosting responds to various requests, most commonly redirecting to the secure HTTPS version of your URL for example.
The .htaccess file can be located inside your Public_html folder.
- login to your cPanel Service.
- Open File Manager.
- Open Public_html.
- Click on Settings and enable Show Hidden Files (dotfiles).
- Open .htaccess
‘Dotfiles’ are hidden by default in cPanel’s file manager but can be easily enabled by navigating to the cPanel then File manager app, and finally the settings tab at the top right where you can click Show Hidden Files (dotfiles).
The .htaccess will now display in your sites root folder (for the primary domain this is the Public_HTML folder) you can edit the file by right-clicking and selecting edit.