I have my react app running great on my local dev server but it did not work when I dump my production ready files straight into Apache\'s htdocs directory:
Here is
What worked for me, echoing many of the answers and comments here:
sudo a2enmod rewrite/etc/apache2/apache2.conf">
RewriteEngine on
# Don't rewrite files or directories
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
# Rewrite everything else to index.html to allow html5 state links
RewriteRule ^ index.html [L]
sudo service apache2 restartPasting into the site-specific conf file did not work as earlier answers suggested.