As per previous answers, the best way to solve the problem: redefine the fallback strategy.
If you'd like to learn more about client-side routing vs server-side, and particularly about different routing approaches in the React JS, check out this article.