title: how to map this route from mvc controller to a web api controller?
body: <p>We have a mvc project and we would like to move to a web api. The mvc project doesn't have any UI,so it was a mistake to use mvc controller other than a web api controller.</p>
  <p>However, our customers access the mvc controller via url such as:</p>
  <pre><code>https://mysite.azurewebsites.net/indexes/unit/docs/search   (both httppost)
  https://mysite.azurewebsites.net/indexes/unit/docs/post   (both httppost)
  https://mysite.azurewebsites.net/indexes/unit/docs/get
  </code></pre>
  <p>the part unit/docs is actually dynamic (something we send to a database to do some query).</p>
  <p>If we move this controller to web api, how can we handle the route as we need to be backward compatible?</p>