title: How to bundle a React app to work in ANY subdirectory on a server?
body: <p><a href="https://stackoverflow.com/questions/37396427/how-to-bundle-a-react-app-to-a-subdirectory-on-a-server">This SO thread</a> explains how to bundle a react app for deployment to a specific subdirectory on a web server. I would like to bundle my react app to work on <strong>any</strong> subdirectory on my webserver. In other words: Is it possible to build a react app, such that I can move it from</p>
  
  <p><a href="http://server/foo" rel="noreferrer">http://server/foo</a></p>
  
  <p>to</p>
  
  <p><a href="http://server/bar" rel="noreferrer">http://server/bar</a></p>
  
  <p>or</p>
  
  <p><a href="http://server/foo/bar" rel="noreferrer">http://server/foo/bar</a></p>
  
  <p>without rebuilding or changing anything?</p>