title: Can I use different pages/routes in Nuxt.js depending on the server's domain?
body: <p>I would like to use one single Nuxt.js app for two different (sub-)domains, so depending on the (sub-)domain, I basically want to use two different routers.</p>
  
  <p>In <em>Vue.js</em> this is easily done by exporting a different router object depending on the (sub-)domain:</p>
  
  <pre><code>import Vue from 'vue';
  import VueRouter from 'vue-router';
  [...]
  Vue.use(VueRouter);
  
  const routerOne = new VueRouter({...});
  const routerTwo = new VueRouter({...});
  
  export default window.location.host.includes('subdomainOne') ? routerOne : routerTwo;
  </code></pre>
  
  <p>But <em>Nuxt.js</em> uses the <code>pages</code> directory for automatically creating the router.
  But I would like <code>https://one.domain.de/overview</code> (as an example) to display a different view than <code>https://another.domain.de/overview</code>, i.e. <em>the pathnames of the URL should eventually be the same, but the pages/views being displayed should be completely different</em>. Is this possible at all?</p>
  
  <p>This way I could easily use (partly) the same components for two different websites.</p>