title: Vue.js routes serving from subdirectory
body: <p>I would like to serve my Vue.js app from a subdirectory on a staging server.  For example: <a href="http://url.com/subdir/app/" rel="noreferrer">http://url.com/subdir/app/</a></p>
  
  <p>Right now if I do this and set up the build config assetsPublicPath to serve from that folder, all the assets are served fine but my app does not get routed correctly.  The "home" page gets routed to the 'catch-all', and any further routes simply show the normal white-page 404.</p>
  
  <p>Here is my router:</p>
  
  <pre><code>export default new Router({
      mode: 'history',
      routes: [
      {
          path: '/',
          component: ContentView,
          children: [
              {
                  path: '/',
                  name: 'DataTable',
                  component: DataTable,
                  meta: { requiresAuth: true }
              },
  
              // ===================================
              //  Login
              // ===================================
              {
                  path: '/login',
                  name: 'AppLogin',
                  component: AppLogin,
                  meta: { checkAlreadyLoggedIn: true }
              },
              {
                  path: '/logout',
                  name: 'AppLogout',
                  component: AppLogout,
                  meta: { requiresAuth: true }
              }
          ]
      },
      {
          path: '*',
          component: ContentView,
          children: [
              {
                  path: '/',
                  name: 'NotFound',
                  component: NotFound
              }
          ]
      }
  ]})
  </code></pre>
  
  <p>And here is the necessary config/index.js changes: <code>assetsPublicPath: '/subdir/app/'</code></p>
  
  <p>In local development the routes work fine.  But on the staging server all static assets, the built JS and CSS etc all serve fine.  However the home route shows the catch-all.  I am assuming it's because my routes are not set up correctly, or because I need to do something to serve from a subdirectory in production.</p>