title: asp.net core mvc change default Identity area routes
body: <p>asp.net core 2.2 Identity was added via       </p>
  
  <pre><code>services.AddIdentity&lt;ApplicationUser, ApplicationRole&gt;()
          .AddEntityFrameworkStores&lt;ApplicationDbContext&gt;()
          .AddDefaultTokenProviders()
          .AddDefaultUI();  
  </code></pre>
  
  <p>The login is set to "/Identity/Account/Login":</p>
  
  <pre><code>options.LoginPath = "/Identity/Account/Login";
  </code></pre>
  
  <p>Now how do I change the routes from the Identity area, which was added via the Startup.cs so that I can do for example:</p>
  
  <p><a href="https://www.example.com/admin" rel="nofollow noreferrer">https://www.example.com/admin</a>  instead of having <a href="https://www.example.com/identity/account/login" rel="nofollow noreferrer">https://www.example.com/identity/account/login</a></p>
  
  <p>or </p>
  
  <p><a href="https://www.example.com/register" rel="nofollow noreferrer">https://www.example.com/register</a> so that it goes to HomeController->RegisterAction. This would allow me to catch and redirect the HomeController->RegisterAction it to HomeController->IndexAction in order <strong>to disable the registrations</strong>.</p>