The .htaccess file is a hidden, plain text file on the server that allows you to define local Apache configuration settings at the directory level for your site. Put simply, .htaccess can be used to do any number of things, including password protect a directory, redirect a domain, turn off directory indexing, or even change the default Index page for a site.
If you've ever setup a redirect or enabled password protection on a directory, you've actually already used your .htacess file. cPanel simply makes the changes to the .htaccess file for you through it's interface. While the tools available in cPanel are quick and easy ways to make these changes, occasionally there can be a conflict if you have other code already in your .htaccess file or if you need to set certain redirects that the cPanel interface can't interpret properly.
First and foremost, before you make any changes to your .htaccess file, make sure you make a copy of it. It's important to remember that the .htaccess file is quite powerful and very sensitive to syntax errors. If you keep a backup of the .htaccess file and your site goes down while editing, you can simply restore from the backup. If you're going to be making multiple changes to the .htaccess file it's a good idea to make a backup after each change so you can revert back to the latest good copy.
Errors caused by .htaccess are not always obvious. You're not going to see an error that says "Check your .htaccess file." Common errors that can often be traced back to the .htaccess file are:
One of the first steps you can do when troubleshooting .htaccess errors is to try renaming the .htaccess file. If this resolves the error, then you know it's something in the .htaccess file. If it doesn't resolve the issue, simply change the name back to .htaccess.
For step-by-step instructions on making changes to your .htacces file, please see our article How to edit your .htaccess file.
If you have questions or need any assistance with your .htacces file, please feel free to ask a question in our Support Center.
Email: | support@WebHostingHub.com | Ticket: | Submit a Support Ticket |
---|---|---|---|
Call: | 757-416-6627 | Chat: | Click To Chat Now |
We value your feedback!
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
new! - Enter your name and email address above and we will post your feedback in the comments on this page!