How to solve “404 Not Found” error while accessing subpages on website.

Date: 17-01-2021

Step 1: You need to enable Apache2 rewrite module by using below command.
# sudo a2enmod rewrite

Step 2: Restart Apache2.
# sudo systemctl restart apache2

Step 3: Add the below details in your website Apache (etc/apache2/sites-available) configuration file.
<Directory "Document root">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
<Directory>

Step 4: Restart Apache2.
# sudo systemctl restart apache2

Thank you!

Leave a Reply