You are here: Home / Topics / How to Enable .htaccess in Apache server in Ubuntu Simple Guide

How to Enable .htaccess in Apache server in Ubuntu Simple Guide

Filed under: Apache Server on 2024-04-07 12:36:54

To configure .htaccess file in your apache server in ubuntu. You need to modify <Directory> Tag in apache2.conf

<Directory /var/www/html/mcqbuddy>
     Options Indexes FollowSymLinks Multiviews
     AllowOverride All
     Require all granted
</Directory>

 

# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives.  See also the AllowOverride
# directive.

AccessFileName .htaccess  //remove # infront of this line

One last thing enable a2enmode rewrite 

That's it .


About Author:
M
Mr. Dubey     View Profile
Founder of MCQ Buddy. I just like to help others. This portal helps students in getting study material free. Share your stuff here so that others can get benefitted.