If your project routes not working or returning 404 on the live server then you can fix the issue by doing two changes in your server configuration.
- Enable mod_rewrite on the apache server
sudo a2enmod rewrite
- Edit /etc/apache2/apache2.conf, changing the "AllowOverride" directive for the /var/www directory (which is my main document root).
Options Indexes FollowSymLinks
Require all granted
Finally, you need to restart the Apache server.
sudo service apache2 restart