.htaccess file in cPanel
The .htaccess (hypertext access) file is a supported directory level configuration file, used for configuring access to a website such as URL redirection, URL shortening, access control to a specific directory, and other very convenient actions for the protection of our website. The 'period' (period or end point) before the file name makes it a hidden file in Unix-based environments.
Creating a .htaccess file can be relatively easy for some and for others a difficulty, in this example we are going to see how to create a .htaccess file in the main directory of our cPanel we will also see how to view the hidden files in our cPanel root directory .
To view the hidden files in our cPanel root directory we don't go (File manager >> Settings >> Show hidden files)
setting
Show hidden files
To create a file we perform the following steps, click again on (File manager), position ourselves in the rais directory of our website (public_html) then go to the upper left and click on (+ file), enter as the name of our file (.htaccess) and save.