title: React-Router Redirect path syntax for path itself AND path with anything following
body: <p>I am redoing some paths in my app and therefore need to preserve the old ones with <code>Redirect</code>.I want to change these routes:</p>
  
  <ol>
  <li>previous path <code>/bar</code> to now redirect to <code>/foo/bar</code>.</li>
  <li>previous path <code>/bar/fizz</code> to now redirect to <code>/foo/bar/fizz</code>.</li>
  </ol>
  
  <p>Here's what I think should work based on the path syntax docs (<a href="https://github.com/ReactTraining/react-router/blob/master/docs/guides/RouteMatching.md#path-syntax" rel="nofollow noreferrer">https://github.com/ReactTraining/react-router/blob/master/docs/guides/RouteMatching.md#path-syntax</a>):</p>
  
  <pre><code>&lt;Route path="/" component={...}&gt;
      &lt;Route path="foo" component={...}&gt;
          &lt;Route path="bar" component={...}&gt;
              &lt;Route path="fizz" component={...}/&gt;
          &lt;/Route&gt;
      &lt;/Route&gt;
      &lt;Redirect from="bar(/*)" to="foo/bar(/*)"/&gt;
  &lt;/Route&gt;
  &lt;Redirect path="*" to="/"/&gt;
  </code></pre>
  
  <p>However this makes only the first desired redirect work, from <code>/bar</code> to <code>/foo/bar</code>. Trying to go to <code>/bar/fizz</code> redirects me to just the root <code>/</code>.</p>
  
  <p>If I change the <code>Redirect</code> to <code>&lt;Redirect from="bar/*" to="foo/bar/*"/&gt;</code> then the opposite is true; only the second desired redirect works, from <code>/bar/fizz</code> to <code>/foo/bar/fizz</code>. Trying to go to <code>/bar</code> redirects me to just the root <code>/</code>.</p>
  
  <p>The only way I've gotten it to work is to include two <code>Redirect</code>s to cover both scenarios. Is there a more concise way to write this with just one <code>Redirect</code>?:</p>
  
  <pre><code>&lt;Route path="/" component={...}&gt;
      &lt;Route path="foo" component={...}&gt;
          &lt;Route path="bar" component={...}&gt;
              &lt;Route path="fizz" component={...}/&gt;
          &lt;/Route&gt;
      &lt;/Route&gt;
      &lt;Redirect from="bar" to="foo/bar"/&gt;
      &lt;Redirect from="bar/*" to="foo/bar/*"/&gt;
  &lt;/Route&gt;
  &lt;Redirect path="*" to="/"/&gt;
  </code></pre>