react-router-tutorial icon indicating copy to clipboard operation
react-router-tutorial copied to clipboard

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

Open Vamshikrishna209 opened this issue 8 years ago • 1 comments
trafficstars

<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

Vamshikrishna209 avatar Mar 21 '17 08:03 Vamshikrishna209

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?

merriam avatar Mar 21 '17 10:03 merriam