I am following the Angular 2 routing examples. Using the \"lite\" webserver I am able to navigate from the root and deep linking works, but using Apache I can navigate fro
For those who's running on Apache use this .htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^(.*) /index.html [NC,L]
</IfModule>
If you still get an error run those 2 commands:
sudo a2enmod rewrite
sudo systemctl restart apache2