Hostwinds Tutorials

Search results for:


Table of Contents


How To Make Sure An .htaccess File is Active.

What is an .htaccess File?

Tags: htaccess 

How To Make Sure An .htaccess File is Active.

The .htaccess file is a configuration file specifically used by Apache-based web servers to help manage certain functionality associated with files/folders directly tied to your website.

Short for Hypertext Access, when a .htaccess file is present in a directory, Apache will load this file and any applicable rules defined in the file. A good example of a rule addition placed in your .htaccess file would be a 301 redirect.

This behavior allows .htaccess files to modify the way Apache operates on a per-directory basis by enabling or disabling functionality/features as defined in the .htaccess file. Since the .htaccess file is a 'dot file,' it is hidden by default.

It is also important to note that the location of this file is critical, as it affects the main directory that it is in and all subdirectories recursively.

How To Make Sure An .htaccess File is Active.

By default, Hostwind's Shared, Business, Reseller, and White Label Reseller hosting accounts allow for the use of .htaccess files. Rules applied through this file are specific to the site you create and cannot override any root-level webserver rules in shared hosting.

If you're on a Cloud VPS or Dedicated Server, you should have full access to modify any available setting via a .htaccess file. To ensure that you can utilize a .htaccess file on a Cloud or dedicated server, you'll need to edit the Apache configuration file and change the option AllowOverride from None to All. It should look similar to the following example:

<Directory /var/www/>
               Options Indexes FollowSymLinks MultiViews
               AllowOverride All
               Order allow, deny
               allow from all  

Once you have made this change, you'll then need to restart Apache. How this is done will depend on your Linux distro. There are many different directives that you can utilize with a .htaccess file.

If you'd like to learn how to create a .htaccess file or you're curious how to edit an already existing .htaccess file, please review the following article, Creating and editing a .htaccess file.

As always, if you have any further questions or need assistance, please feel free to contact our 24/7 Live Chat, and we'll be happy to help you.

Written by Michael Brower  /  June 22, 2017