My Routing is working perfectly when URL is changed through Link component of React-router. However, if I try to change URL manually in browser, it hits 404 Error.
Below
if you are using webpack-dev-server. set:
devServer{
//...
historyApiFallback: true
}
it would serve 'index.html' in place of any 404 responses...
if you've published to server.make sure your server config make it redirect to main html
express:
app.get('/*', function(req, res) {
res.sendfile('index.html');
});
gulp-connect:
connect.server({
root: ['dist'],
port: config.port,
base: config.devBaseUrl,
livereload: true,
fallback: 'index.html'
});