Often core files such as an htaccess are hidden by default to ensure security. Would you like to access the .htaccess file in eWebGuru’s cPanel? Here we guide you to access your hidden htaccess file in your control panel.
How to access the hidden htaccess file in cPanel
Step 1 First you have to log into the cPanel. To log in you need to enter your domain name / cPanel in a browser. Enter your cPanel login username and password and press Enter.
For example: www.yourdomain.com/cpanel
cpanel login page
Step 2 Find and click the File Manager option in the File section of the cPanel dashboard.
Click on File Manager
Step 3 The file manager will now open. You can see the Settings button in the top corner. Click this Setting button.
Click on the settings option in the top corner
Step 4 The “Settings” pop-up opens. Please choose Document root [ your domain name]. Now select the option “Show hidden files” in the following checklist. and click the ‘Save’ button.
Step 5 Now you can view your htaccess file in the file manager of your cPanel. Now click with the right mouse button on the .htaccess file.
Step 6 After right clicking on this file, a popup will appear with various options. Now select the option “Edit” in this list.
Step 7 Now another popup will appear asking you to choose the character encoding. You need to select the ‘utf 8’ format and hit the edit button.
Step 8 The editor screen will open. Now you can edit your ht access file. Please make sure you take the following precautions when editing htaccess.
Precautions when editing the htaccess file.
- You have to create a backup of the htaccess file before editing. To create a backup copy of the htaccess file, right-click the htaccess file in the file manager. Then select the ‘Copy’ option. This file is copied to the same directory.
- Do not break existing scripts in .htaccess. This can lead to the failure of the website.
- Make sure to add a description to your codes shown below.
# Enable GZip compression
script
# End enable GZip compression
Ashok Arora is the CEO and founder of eWebGuru, a leading Indian web hosting company. He is a tech enthusiast with over 25 years of internet and technology experience.
Ashok holds a Masters in Electronics from a leading Indian university.
Ashok loves to write on the cloud, servers, data centers and virtualization technology.
Comments are closed.