title: How do redirect API route to other API route in asp.net
body: <p>I'm fairly new to ASP.NET MVC and I have a situation where I have one deprecated API route for which if some tries to access that API route I need to <strong>redirect</strong> it to new API route.</p>
  <p>Example:
  GET /api/v1/getNames (deprecated API) --&gt; GET /api/v2/getNames with a response code 308</p>
  <p>Any ideas/examples how to do that? I'm trying to use RedirectResult() method but I'm still getting 200 response code with following body:</p>
  <pre><code>{
    permanent: true,
    preseveMethod: true,
    url: &quot;/api/v2/getNames&quot;
  }
  </code></pre>
  <pre><code> [System.Web.Http.HttpGet]
   [System.Web.Http.Route(&quot;/v1/getNames&quot;)]
   public IActionResult Get() {
   return new RedirectResult(&quot;/v2/getNames&quot;, true, true);
  }
  </code></pre>