.htaccess file configuration to apache

Write .htaccess file according to your need and to configure it do these steps:

First Step

Open file as
sudo vim /etc/apache2/apache2.conf

Second Step
remove comment sign (#) if you find it before this line ( line number 187 approx.)
AccessFileName .htaccess

Third Step

Then find the line where there is
<Directory /var/www/> Options Indexes FollowSymLinks AllowOverrideNone Require all granted </Directory>
replace “None” with “All”
AllowOverride All

now htaccess works 🙂


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.