title: Create an alias for razor page
body: <p>I'm playing with asp.net razor pages.</p>
  
  <p>I've created default asp.net core 2.1 application then added 3 pages:</p>
  
  <p><a href="https://i.stack.imgur.com/koUtN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/koUtN.png" alt="enter image description here"></a></p>
  
  <p>By <a href="https://docs.microsoft.com/en-us/aspnet/core/razor-pages/?view=aspnetcore-2.0&amp;tabs=visual-studio" rel="nofollow noreferrer">default convention</a> pages will available in path:</p>
  
  <pre><code>Page1 -&gt; http://localhost/Page1
  Page2 -&gt; http://localhost/Folder/Page2
  Page3 -&gt; http://localhost/Page3
  </code></pre>
  
  <p>And now I want to add an alias for page2, e.g. something like this:</p>
  
  <pre><code>Page1 -&gt; http://localhost/Page1
  Page2 -&gt; http://localhost/Page2
  Page2 -&gt; http://localhost/Folder/Page2
  Page3 -&gt; http://localhost/Page3
  </code></pre>
  
  <p>Is it possible to create additional route/alias for this page without <a href="https://grantwinney.com/visual-studio-add-file-as-link/" rel="nofollow noreferrer">adding-file-as-link</a>?</p>
  
  <p>Specifying page route in @page</p>
  
  <pre><code>@page "/Page2"
  @{
      ViewData["Title"] = "Page2";
  }
  
  &lt;h2&gt;Page2&lt;/h2&gt;
  </code></pre>
  
  <p>makes page2 available as <code>http://localhost/Page2</code>, but not as <code>http://localhost/Folder/Page2</code> :(</p>