In a Single Page Application (SPA), client-side routing manages navigation without full page reloads, which means the server needs to serve the index.html file for any routes requested by the client, except for static resources.
Some servers do not support this kind of application, so it is necessary to configure it manually by adding some configuration to the .htaccess file.
.htaccess file on the root of your application directory:
RewriteEngine On
# If an existing asset or directory is requested go to it as it is
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^ - [L]
# If the requested resource doesn't exist, use index.html
RewriteRule ^ /index.html