I have a create-react
app with react-router-dom
. It works quite well if I start from the root (i.e. '/') and then follow links defined in Link
s. But if I try to load the app not from the root path, it says
Cannot GET /<path>
As I understand, this should be set on the server-side (I am working on regular localhost:9000). Or not? Anyway, how to achieve this practically?
Notice, this is not relevant to the base path resolving problem, described here: Can I set a base route in react-router
UPDATED:
I suppose, there should be a solution similar to using .htaccess
. But I still cannot figure out how to apply it to create-react-app
. Or, maybe, it is possible to set an appropriate option in webpack.config.js?
Update 2. Repo is here: https://github.com/srgg6701/react-mini