A .htaccess file (or "distributed configuration files") used on Apache web servers provides a way to make configuration changes on a per-directory basis.

It usually contains one or more configuration directives and when placed in a particular document directory, the directives apply to that directory, and all sub-directories under it.

Like any other Apache configuration file, the .htaccess file is read from top to bottom.

Configurations at the top will be executed before the ones at the bottom.

It means that you need to pay attention to the order of your rules to ensure it is working correctly and efficiently.

Log in to cPanel

Select File Manager from the Files section.

When the page loads at /home/$user/public_html, select the .htaccess file and click on Edit

If the file is not visible, click Settings on the top-right side of your File Manager.

how to enable htaccess file in cPanel

Select the Show Hidden Files files and Save.

 

IMPORTANT

As with any server configuration file, a typo in the .htaccess file can cause your server to go down.

If you are not what you do when faced with this, consult with your web developer or ask our technical support team.

If you know what you are doing, always backup the original .htaccess file before making changes to the file.

Was this answer helpful? 0 Users Found This Useful (0 Votes)