title: How to redirect old react-router HashRouter (with the #) to BrowserRouter?
body: <p>We're replacing <code>react-router-dom</code>s <code>HashRouter</code> with <code>BrowserRouter</code> and would like to redirect old routes to the new ones.
  I tagged <code>nginx</code> because I don't mind making redirects there. :)</p>
  
  <p>So say we have an old route <code>/#/users</code> and <code>/#/users:id</code>: They should match and redirect to <code>/users</code> and <code>/users/:id</code>.</p>
  
  <p>So far I tried (<code>react-router-dom v5.0.1</code>):</p>
  
  <pre><code>&lt;Router&gt;
    &lt;Switch&gt;
      &lt;Route path='/users' component={UsersComponent} /&gt;
      &lt;Route path='/users/:id' component={UsersDashComponent} /&gt;
    &lt;/Switch&gt;
    &lt;Redirect from='/#/users' to '/users' /&gt;
    &lt;Redirect from='/#/users/:id' to='/users/:id' /&gt;
  &lt;/Router&gt;
  </code></pre>
  
  <p>The first route matches and redirects fine. The second one (with the <code>id</code>) is problematic. When I navigate to <code>/#/users/123</code> it redirects to <code>/users/:id</code>. It's replacing the actual <code>123</code> with <code>:id</code>.</p>
  
  <p>Those are two examples of routes. We have more with params to redirect as well.</p>