title: ASP.NET Core routing prefix
body: <p>I'm developing an ASP.NET Core application. My application hosted with NGinx on url <code>http://somedomain.com/MyApplication</code>.</p>
  
  <p>I need all requests routed to prefix <code>/MyApplication</code>.</p>
  
  <p>My problem with controllers actions responses redirects to <code>somedomain.com</code>, not to <code>somedomain.com/MyApplication</code>.</p>
  
  <p>Is there any way to configure routes to use prefix <code>/MyApplication</code>?</p>
  
  <p>UPD: for example </p>
  
  <pre><code>        [HttpGet]
          [AllowAnonymous]
          public async Task&lt;IActionResult&gt; Login(string returnUrl = null)
          {
              // Clear the existing external cookie to ensure a clean login process
              await HttpContext.SignOutAsync(IdentityConstants.ExternalScheme);
  
              ViewData["ReturnUrl"] = returnUrl;
              return View();
          }
  </code></pre>
  
  <p>redirects to somedomain.com, but i need to somedomain.com/MyApplication</p>