What is .htaccess and what can I do with it? Print
Submit Cancel
Email this article

Close

You are here: Home > Website Support > .htaccess Config

A .htaccess file is a simple ASCII file (text file), which can be created through a text editor like NotePad or SimpleText. A .htaccess file provides a way to make configuration changes on a per-directory basis. The Apache web server allows for great flexibility for your domain’s Apache configuration by making us of a .htaccess file.

Traditionally you would place a .htaccess file in the root of your public_html (Full path: /usr/www/users/ftp-username), however the location of the file is dependant on what you want to achieve. If placed in the root of the public_html the .htaccess file will have affect on your entire site. You can also place the .htaccess file in subdirectories, in which case the file will only affect files under that subdirectory.

The .htaccess file can be created on the server while logged in via Telnet, SSH or created locally on your own machine and then uploaded via FTP.

There is a range of things a .htaccess can do, including: password protecting folders, automatically redirecting users to different websites or locations on the current site, custom error pages, changing file extensions, banning users with certain IP addresses, only allowing users with certain IP addresses, stopping directory listings and using a different file as the index file.

There are a variety of tools available in konsoleH (Index Manager, Protect Directory, Redirect) which assist in the creation and management of .htaccess files.

Was this information helpful?

Yes No

Thank you for your feedback
We are delighted to find that our article resolved your query.

Thank you for your feedback
We will resolve your query as soon as possible.

Please take a few moments to comment on your unresolved query. Simply tell us what your problem is. We guarantee that we'll get back to you within two hours (during office hours) in response to your query.


  Partially resolved    Unresolved
Enter your query here:
Your name:
Your email address:
Contact number:
Customer number or domain name:
 
Preferred contact method: Email     Call me
Please enter the text in the picture below into the text box:
CAPTCHA Image:
ID Number:
 
  • Hosting for Beginners

    Step-by-step guide to hosting with Hetzner.

    VIEW NOW
  • Application Tutorials

    Use our installation guides to get up and running.

    VIEW NOW
  • Login Now

    Our award winning proprietary control panel empowers customers to manage their hosting environment.

    Take the Tour
  • Contact Us

    support@hetzner.co.za

    Phone: 0861-0861-08
    Fax: 0861 0861-09
    Contact Us