<p dir="auto">Hi,</p>
<p dir="auto">I have one of my pages inside a subfolder called admin. I called it index, so that it would be rendered when I navigate to the root of the route in the browser. I would like routing in the browser to work like this: localhost/admin/ returns my page. However, instead I do get a 404.</p>



<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/zeit/next.js/issues?q=is%3Aissue">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>

<p dir="auto">I named my page inside of the admin folder index.js. I was expecting that navigating to /admin/ in a browser would lead to my page, just like navigating to the root of my project renders index.js located in pages folder.</p>

<h2 dir="auto">Current Behavior</h2>
<p dir="auto">A 404 is returned instead of my page being rendered. Calling my page dashboard and navigating to admin/dashboard works fine though. I would like to see similar behavior to the index page located inside of the pages folder.</p>


<h2 dir="auto">Steps to Reproduce (for bugs)</h2>


<ol dir="auto">
<li>create a subfolder inside your pages folder</li>
<li>put any page there and call it index.js</li>
<li>navigate in your browser to localhost/subfolder/</li>
</ol>
<h2 dir="auto">Context</h2>


<h2 dir="auto">Your Environment</h2>

<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>next</td>
<td>5.7.1</td>
</tr>
<tr>
<td>node</td>
<td>8.2.1</td>
</tr>
<tr>
<td>OS</td>
<td>Mac OS</td>
</tr>
<tr>
<td>browser</td>
<td>Chrome</td>
</tr>
<tr>
<td>etc</td>
<td></td>
</tr>
</tbody>
</table>
<h1 dir="auto">Feature request</h1>
<h2 dir="auto">Is your feature request related to a problem? Please describe.</h2>
<p dir="auto">Yes. I have an user case that makes sense have two or more dinamic routes in the same folder.</p>
<h2 dir="auto">A clear and concise description of what you want and what your use case is.</h2>
<p dir="auto">When we use dynamic routes we cant use different slug names for the same dynamic path as it throws the error <code class="notranslate"> 'You cannot use different slug names for the same dynamic path.'</code>.</p>
<p dir="auto">Example:<br>
This works:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/13935760/67116253-702f4a00-f1b6-11e9-88a6-06e81d2223ea.png"><img src="https://user-images.githubusercontent.com/13935760/67116253-702f4a00-f1b6-11e9-88a6-06e81d2223ea.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">This dont (throws the error on <code class="notranslate">yarn dev</code>):<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/13935760/67116324-9228cc80-f1b6-11e9-9415-158c104807f4.png"><img src="https://user-images.githubusercontent.com/13935760/67116324-9228cc80-f1b6-11e9-9415-158c104807f4.png" alt="image" style="max-width: 100%;"></a></p>
<ul dir="auto">
<li>The difference between both is that on second example I have 2 dinamic paths inside [city] ([valuezone] and [neighborhood]) and on first I have only [valuezone].</li>
</ul>
<p dir="auto">The point is that the <code class="notranslate">valuezone</code> is our bussiness name to a group of <code class="notranslate">neighborhoods</code> and we have some neighborhoods under our <code class="notranslate">valuezone</code> and some out of it. So, we have 2 types of url.</p>
<ol dir="auto">
<li>
<p dir="auto">The neighborhood is under a mapped valuezone<br>
<code class="notranslate">/comprar/[realtyType]/[state]/[city]/[valuezone]/[neighborhood]</code></p>
</li>
<li>
<p dir="auto">The neighborhood wont have a mapped valuezone<br>
<code class="notranslate">/comprar/[realtyType]/[state]/[city]/[neighborhood]</code></p>
</li>
</ol>
<p dir="auto">To archieve the behavior  I need to add both <code class="notranslate">[valuezone]</code> and <code class="notranslate">[neighborhood]</code> under <code class="notranslate">[city]</code>, but this throws the error I describe above.</p>
<h2 dir="auto">Describe the solution you'd like</h2>
<p dir="auto">It would be awesome if we could use thing like the second image, as we redirect especifying the path and the variables we want, that dont leaves doubts of what path we want to render.</p>
<h2 dir="auto">Describe alternatives you've considered</h2>
<p dir="auto">In my especific case if I just change the order of [neighborhood] and [valuezone] the problem is solved, but this only works because I have only one conditional path, in other user cases I cant see an solution with friendly URL.</p>