Thursday 2 July 2015

How to use .htaccess file on Apache server



You need to have AllowOverride AuthConfig directive in httpd.conf file in order for these directives to have any effect. Look for DocumentRoot Directory entry. In this example, our DocumentRoot directory is set to /var/www. Therefore, my entry in httpd.conf looks like as follows:

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

Save the file and restart Apache
 
If you are using Red Hat /Fedora Linux:
# service httpd restart


If you are using Debian Linux:
# /etc/init.d/apache-perl restart


No comments:

Post a Comment

How to install clamAV on Centos 6

  Install EPEL repo: Before we can do proceed, you must ensure that you have the EPEL yum repository enabled. To do this, CentO...