title: React Router's HashRouter redirects to <base> tag url
body: <p>I have non-SPA server-side application with React application that is limited to current page, <code>/some/static/page</code>. <em>The application has <code>&lt;base href="/"&gt;</code> in <code>&lt;head&gt;</code> on all pages and relies on it, this cannot be changed.</em></p>
  
  <p>Here is basic example with React 16, React Router 4 and <code>&lt;HashRouter&gt;</code>:</p>
  
  <pre><code>export class App extends React.Component {
      render() {
          return (
              &lt;HashRouter&gt;
                  &lt;div&gt;
                      &lt;Route exact path="/" component={Root} /&gt;
                  &lt;/div&gt;
              &lt;/HashRouter&gt;
          );
      }
  }
  </code></pre>
  
  <p>All routes can be disabled for testing purposes, but this doesn't change the behaviour.</p>
  
  <p><a href="https://www.dropbox.com/s/5mrd9ux4tblwruy/react-hash-routing.zip?dl=1" rel="noreferrer">Here is <code>create-react-app</code> project</a> that shows the problem. The steps to replicate it are:</p>
  
  <ul>
  <li><code>npm i</code></li>
  <li><code>npm start</code></li>
  <li>navigate to <code>http://localhost:3000/some/static/page</code></li>
  </ul>
  
  <p>HashRouter is clearly affected by <code>&lt;base&gt;</code>. It redirects from <code>/some/static/page</code> to <code>/#/</code> on initialization, while I expect it to be <code>/some/static/page#/</code> or <code>/some/static/page/#/</code> (works as intended only in IE 11).</p>
  
  <p>There's a quick splash of <code>Root</code> component before it redirects to <code>/#/</code>.</p>
  
  <p>It redirects to <code>/foo/#/</code> in case of <code>&lt;base href="/foo"&gt;</code>, and it redirects to <code>/some/static/page/#/</code> when <code>&lt;base&gt;</code> tag is removed.</p>
  
  <p><strong>The problem affects Chrome and Firefox (recent versions) but not Internet Explorer (IE 11).</strong></p>
  
  <p>Why is <code>&lt;HashRouter&gt;</code> affected by <code>&lt;base&gt;</code>? It's used here exactly because it isn't supposed to affect location path, only hash. </p>
  
  <p>How can this be fixed?</p>