reactjs / react-router-tutorial

5.52k stars 1.75k forks source link

On using browser History , Directly routing to a inner link shows as Cannot GET /about #309

Open Vamshikrishna209 opened 7 years ago

Vamshikrishna209 commented 7 years ago
<Router history={browserHistory}>
    <Route path="/" component={App}>
        <Route path="/home" component={Home}/>
        <Route path="/repos" component={Repos}>
            <Route path="/repos/:userName/:repoName" component={Repo}/>
        </Route>

        <Route path="/about" component={About}/>
    </Route>
    {/* add the routes here */}

</Router>

Using this , By loading the page with Url :- http://localhost:8080/about is giving Error How can I solve this while using Gulp

merriam commented 7 years ago

Could you give a bit more information? For example, which step you are on and what error you get?

DId you do the step yet where you add '--history-api-fallback' to package.json? There is one section that says "now try it. See, it doesn't work yet."

Or is your question about doing the equivalent using Gulp instead of WebPack?