What is .htaccess?

Using .htaccess files lets you control the behavior of your site or a specific directory on your site. For example, if you place a .htaccess file in your root directory, it will affect your entire site (www.coolexample.com). If you place it in a /content directory, it will only affect that directory (www.coolexample.com/content).

.htaccess works on all of our Linux hosting accounts.

Some examples of what a .htaccess file can be used for are:

  • Customize the error pages for your site
  • Protect your site with a password
  • Enable server-side includes
  • Deny access to your site based on IP
  • Change the default page (index.html) that is loaded for your site
  • Redirect visitors to another page
  • Prevent directory listing
  • Add MIME types

A .htaccess file is a simple text file with the name .htaccess. It is not a file extension like .html or .txt, as the entire file name is .htaccess. For more information on how to set up .htaccess files, visit Apache's website.

Note: Make sure you create a .htaccess file using a plain text editor that doesn't use word wrap. Some editors (such as MS Word or Notepad with word wrap enabled) will insert invisible characters to signify a line break. Your .htaccess file will not work if it has these special characters in it.


이 글이 도움되었나요?
피드백을 보내주셔서 감사합니다. 고객 서비스 담당자에게 문의하시려면 지원 전화 번호 또는 위의 채팅 옵션을 이용하시기 바랍니다.
도와드릴 수 있어 기쁩니다! 더 도와 드릴 것이 있나요?
그것 유감스럽습니다. 혼동이 되었던 사항 또는 솔루션이 고객님의 문제를 해결하지 못했던 원인을 알려주세요.