Resource icon

Activating htaccess Plesk: Step by Step Guide

Htaccess files are an important set of files in Apache that are used for configuration purposes. But before they can be used, you need to activate them. In Plesk, activating htaccess is not a tough endeavor. However, you need to know about the correct steps. In this article, you’ll learn how to activate htaccess in Plesk step-by-step.

Where is .htaccess file located?
The .htaccess file resides in the web root folder (this folder contains the whole website). You need to look in the public_html and www. In case you have a directory where there are multiple subdirectories, it could be in qw.

But since most file systems don’t openly reveal files that start with dot(.), you can’t access them by default. One way is to utilize the FTP client or File Manager. You will find an option that reads ‘display hidden files’. Different applications have different interfaces. But you will certainly find it under Folder Options or Settings or something similar.

Before you learn the steps on how to activate htaccess in Plesk, it’s better to learn how the file works. This will help you absorb the steps better.

As opposed to centralized registry architecture of Windows, programs like Apache and qmail are configured by text files in Linux. One advantage of this approach is you can disperse the configuration of a certain domain acrossdifferent files easily.

In Plesk’s Apache setup, you’ll find four parts to activate htaccess Plesk. These are:
  • httpd.conf – It’s the master file that covers all the settings of the server (both general and default) for all the domains. In this file, you can find the file type and the features that are loaded. You can tweak the servers by making modifications to this file. Plesk doesn’t write to this file, which helps regarding that.
  • http.include – This file configures the default settings that are employed by the server for all of the IP addresses. Along with that, it generates general subdomains wherever necessary. Plesk can write to this file and make modifications.
  • conf/httpd.include – You can find this file in the domain’s home folder. It contains domain-specific settings like Web User settings and subdomains.
  • .htaccess – This file stores the instantaneous server configurations and keeps them within a the folder. The settings apply only to that folder and to the sub-folders contained therein.
Please note that Plesk control the first three file types. Therefore, it’s not possible to manipulate settings for particular sections of the website. You need to interact with Apache and alter the settings manually with .htaccess for activating htaccess for Plesk.

Steps Involved in Activating htacess for Plesk
  • Locate the .htaccess configuration file
  • Use your preferred editor to open the file
  • Add the following Directory tag to the .htaccess file:
Code:
# Disable .htaccess for /var/www directory for security Directory "/var/www"
Allowoverride none
/Directory

# Enable .htaccess for /var/www/html directory and its subdirectories
Directory "/var/www/html"
Allowoverride all
/Directory
Code:
The first tag will disable .htaccess in /var/www directory. The second tag, on the other hand, will enable the use of .htaccess in /var/www/html directory.

Doing so will activate .htaccess in Plesk.
Author
kumkumsharma
Views
5,091
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from kumkumsharma

Top