React-router v4 - cannot GET *url* : <p>I started to use react-router v4. I have a simple <code>&lt;Router&gt;</code> in my app.js with some navigation links (see code below). If I navigate to <code>localhost/vocabulary</code>, router redirects me to the right page. However, when I press reload (F5) afterwards (<code>localhost/vocabulary</code>), all content disappear and browser report <code>Cannot GET /vocabulary</code>. How is that possible? Can somebody gives me any clue how to solve that (reload the page correctly)?</p>

<p>App.js:</p>

<pre><code>import React from 'react'
import ReactDOM from 'react-dom'
import { BrowserRouter as Router, Route, Link } from 'react-router-dom'
import { Switch, Redirect } from 'react-router'
import Login from './pages/Login'
import Vocabulary from './pages/Vocabulary'

const appContainer = document.getElementById('app')

ReactDOM.render(
  &lt;Router&gt;
    &lt;div&gt;
        &lt;ul&gt;
          &lt;li&gt;&lt;Link to="/"&gt;Home&lt;/Link&gt;&lt;/li&gt;
          &lt;li&gt;&lt;Link to="/vocabulary"&gt;Vocabulary&lt;/Link&gt;&lt;/li&gt;
        &lt;/ul&gt;
        &lt;Switch&gt;
          &lt;Route exact path="/" component={Login} /&gt;
          &lt;Route exact path="/vocabulary" component={Vocabulary} /&gt;
        &lt;/Switch&gt;
    &lt;/div&gt;
  &lt;/Router&gt;,
appContainer)
</code></pre>
