Today I have installed Ubuntu 14.04 for web development and installed fresh WordPress but after clicking on any pages, it takes me to the apache 404 page so how to fix this issue?
First, open your terminal and follow these steps:
Step 1:
Activate the mod_rewrite module
sudo a2enmod rewrite
Step 2:
Restart the apache server
sudo service apache2 restart
Step 3:
To use mod_rewrite from within .htaccess files (which is a very common use case), edit the default VirtualHost with
sudo nano /etc/apache2/sites-available/000-default.conf
Step 4:
Search for “DocumentRoot /var/www/html” and add the following lines directly below:
<Directory "/var/www/html"> AllowOverride All </Directory>
Save and exit the nano editor via CTRL-X, “y” and ENTER.
Step 5:
Restart the server again:
sudo service apache2 restart
Step 6:
Check if mod_rewrite is installed correctly, check your phpinfo() output. It should have this in it:
Keep visiting for new stuff and give your feedback.
Happy Coding 😉