It may be that you are trying to use an .htaccess file on your Dedicate Server to do URL rewriting, authentication, management, handling error pages, etc… Except that at the time of you perform the tests you notice that nothing happens, then you certainly start thinking now what…
In fact, this is due to the configuration of your website in Apache and particularly the value assigned to “AllowOverride”, which stipulates that default does not take into account the type of files in .htaccess.
Let’s take a closer look to parameter “AllowOverride” so see the different values that can be attributed to the cause of the issue and what it means. We will check the possible values with an explanation for each of them.
1-“None”: By default implies that .htaccess files are ignored for the entire website.
2-“AuthConfig”: It is a value that specifies the authorization of permissions guidelines, more precisely authentication (AuthName, AuthType, etc…)…
3-“FileInfo”: a value that allows the use of documents and module control directives such as the ErrorDocument directive for the error message personalization and a URL has rewritten with “URLRewrite”.
4-“Indexes”: Value that allows the use of guidelines for the indexing of files, such as to define a “DirectoryIndex” or alternative index.
5-“Limit”: Value that allows the use of guidelines for server access restrictions, namely Allow, Deny and Order.
6-“All”: Value that allows the use of all instructions.
Note: You can combine multiple values to allow only types of directives that you want.
Now we will see Modification part:
Now we have taken knowledge of the different value that can be assigned to the “AllowOverride”. Now we can change the configuration of Apache of our website. In case you use the default Apache site (which is the case if you have only one site on your server), the file to edit is:
AllowOverride None Apache
In the configuration directory “/var/www/” that corresponds to the root of our website, we note the presence of “AllowOverride None” therefore means, I do not know .htaccess or more precisely ‘ignores all the guideline contained in .htaccess files’.
Change the value assigned to the parameter with one (or more) value indicated above. For example:
AllowOverride All Apache
Restart Apache Service:
After the setting, it will just need to restart Apache served so that it takes into account the changes. Then you can your files .htaccess!
Service apache2 restart