How to fix htaccess that is not read?

We are mostly face 404 issue on direct hit url but everything is properly setup in our server. we also have htaccess file but after this issue is not resolve then this is our Apache server issue. we need to setup htaccess file read issue. Here I am sharing setup.

Step 1: Login server through putty

Step2: Go to this location /etc/apache2/apache2.conf.

Step3: Find out this code and replace according to below given.

<Directory /var/www/> Options Indexes Follow Sym Links Allow Override All Require all granted.

Step4: Enable module rewrite $ Sudo a2enmod rewrite.

Step 5: Restart Apache server $ Sudo service apache2 restart $ Sudo systemctl restart apache2

Now your issue is fixed.

Last updated