score:4

Accepted answer

Worked.

Used the following .htaccess code:

RewriteEngine On  
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^ - [L]

RewriteRule ^ /index.html [L]

And used the following terminal command to build the project using webpack:

webpack --inline --history-api-fallback --progress -p

score:-2

To my understanding,if you say http://localhost:8080/home it will made server-side router call. You need it setup it first,

https://github.com/reactjs/react-router/blob/master/docs/guides/ServerRendering.md

score:0

You need to configure your app to serve index.html when visiting /home.


Related Query

More Query from same tag