What is .htaccess and how do I enable directory visibility?
- What is .htaccess?
What is .htaccess?
The .htaccess (hypertext access) file is a directory-level configuration file supported by several web servers, and is used to configure site access problems, such as URL redirection, URL shortening, access control (for different web pages and files). ) and much more.
The dot before the file name makes it hidden in the server directory .
I don't see .htaccess in the directory?
How to enable visibility of .htaccess file?
The first thing you need to do is log in to the cpanel of your site, then access the content in public_html.
By default cpanel settings files containing a dot in front of the name are hidden, to allow access to the .htaccess file and other hidden files you need to click on the "settings" button in the upper right corner as shown in the figure:
After that you will get the following window with preferences. It is necessary to click on the so-called. "checkbox" next to Show Hidden Files (dotfiles) to enable the visibility of hidden files - See the following image.
Then click on the "Save" button - save and the .htaccess file will be visible in your directory along with other hidden files.
For more information on setting up a .htaccess file, check out some of our next blog posts.