title: Svelte Routing 404 on nested layouts
body: <p>I'm following the guide in SvelteKit docs.</p>
  <p>On the nested layouts section I came across an issue and want to know if I'm doing something wrong or if this is a bug.</p>
  <p>I have the following layout...(just like in  the docs!)</p>
  <pre><code>/routes/
    /__layout.svelte
    /index.svelte
    /about.svelte
    /settings/
      /__layout.svelte
      /profile.svelte
      /notifications.svelte
  </code></pre>
  <p>In <code>/routes/__layout.svelte</code> i have the following code:</p>
  <pre><code>&lt;nav&gt;
      &lt;a href=&quot;./&quot;&gt;Home&lt;/a&gt;
      &lt;a href=&quot;/about&quot;&gt;About&lt;/a&gt;
      &lt;a href=&quot;/settings/profile&quot;&gt;Settings&lt;/a&gt;
  &lt;/nav&gt;
  
  &lt;slot /&gt;
  </code></pre>
  <p>and in the <code>/routes/settings/__layout.svelte</code> i have the following code:</p>
  <pre><code>&lt;h1&gt;/settings&lt;/h1&gt;
  
  &lt;div class=&quot;submenu&quot;&gt;
      &lt;a href=&quot;/settings/profile&quot;&gt;Profile&lt;/a&gt;
      &lt;a href=&quot;/settings/notifications&quot;&gt;Notifications&lt;/a&gt;
  &lt;/div&gt;
  
  &lt;slot&gt;&lt;/slot&gt;
  </code></pre>
  <p>every other <code>*.svelte</code> file only has an <code>h1</code> tag with the page route hardcoded in it like... <code>&lt;h1&gt;/index&lt;/h1&gt;</code> and so on.</p>
  <p>The issue I encountered was that when I click on the <code>Settings</code> link it navigates to the appropriate link, in this case <code>/settings/profile</code>, but then when I click on the nested link <code>/settings/notifications</code> and then click on any other top nav link such as <code>Home</code> link, i get a 404 error that says <code>Not Found: /settings</code></p>
  <p>If I click on <code>Home</code> again, then it shows the <code>/index</code> link correctly.</p>
  <p>On the url bar it looks like the router only moves up one level... so from <code>/settings/notifications</code> it goes to <code>/settings</code> which does not exists on the routes directory.</p>
  <p>Sorry for the long post and thanks in advance for any help/clarification.</p>