title: react-router for navigating directory
body: <p>I am building a component in my app that allows the user to navigate a directory which contains sub-directories and files. There is no limit on the number of sub-directories.</p>
  
  <p>I would like to use the URL to indicate position with the sub-directories. For example, take this structure:</p>
  
  <pre><code>- dir
  -- sub-dir1
  ---- sub-dir2
  ------ sub-dir5
  -------- image.jpg
  ---- sub-dir3
  ---- sub-dir4
  </code></pre>
  
  <p>If someone has navigated to <code>sub-dir5</code> then I would like the URL to show:</p>
  
  <pre><code>`myapp.com/dir/sub-dir1/sub-dir2/sub-dir5`
  </code></pre>
  
  <p>While I know how to do this if the folder structure was known in advance using <code>:param</code> values, I'm not sure about how to tackle setting up the routes when there could be any number of sub-directories.</p>
  
  <p>I'm using <code>react-router v4</code></p>