title: Slash issues in sites which use React router
body: <p>Already week I stumbled a bug which related <code>React-router</code>.Firstly I think this bug is only in my site.Then I find out that a giant corporation's that use a <strong>ReactJS</strong> have same issue.</p>
  
  <p>If you wrote more than one slash in url and press enter you will see the (small)site(s) show <code>header</code> and <code>footer</code>.</p>
  
  <p>And giant project's behaviour will be unusual.Some of components will be break some of them will not shown.</p>
  
  <p>Example of this project's.</p>
  
  <p><a href="https://www.marvel.com//" rel="nofollow noreferrer"><strong>Marvel</strong></a>, <a href="https://www.airbnb.ru//" rel="nofollow noreferrer"><strong>Airbnb</strong></a></p>
  
  <p>So.I try to clean up my URL.</p>
  
  <pre><code>if (window.location.pathname.length &gt; 1) {
        // const url = window.location.pathname.slice(0, 1);
        const url = window.location.pathname.replace(/\/\//g, "");
        history.push(`${url}`);
  }
  </code></pre>
  
  <p>I don't know why  this try not work.</p>
  
  <p><a href="https://nn8x24vm60.csb.app/" rel="nofollow noreferrer"><strong>Codesandbox</strong></a> for test.If you write more than one slash in url it will show only list of component's.How to fix that?</p>