title: Can I create alias routes using react router?
body: <p>I am working on a new project to be built using react and react-router. I am planning to restructure my routes in such a way that it is cleaner than before. However, I don't want to break older bookmarks that users may have.</p>
  
  <p>For instance, my new routes might look like:</p>
  
  <pre><code>    &lt;Route  path="/" component={Layout}&gt;
          &lt;Route component={ItemList} path="items/:category"  /&gt;
          &lt;Route component={ItemDetail} path="item/:designCode" /&gt;
      &lt;/Route&gt;
  </code></pre>
  
  <p>Some example routes could be, say - /items/electronics, /items/gifts.</p>
  
  <p>However, I have a legacy code base that had routes of the kind - /electronic-items, /buy-gifts, etc.</p>
  
  <p>Is there a way I can create route aliases to be able to map these legacy URLs to the newly structured ones?</p>
  
  <p>I have come across <a href="https://router.vuejs.org/en/essentials/redirect-and-alias.html" rel="noreferrer">something similar in Vue 2.0</a>, but am particularly interested in a react solution. Any suggestions (apart from - use redirects or use Vue itself instead :D)?</p>