DEV Community


Posted on

SPA application error 404 on refresh

If you deploy your SPA application on a server as Godaddy or other service and try to access a url diferent from root folder as /about and has an error 404 you can try to solve your problem following this documentation from react:

But the fast answer for your question is to create a .htaccess file on your server and past the following code:

Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.html [QSA,L]

Top comments (0)