title: How to remove the controller name from the url in MVC
body: <p><code>&lt;p&gt;&lt;a href="/Home/index2"/&gt;&lt;/p&gt;</code> if I click on this <code>href</code> tag,we will call the index page in which we will access the webapi using ajax request.</p>
  
  <blockquote>
    <p>'localhost/api/PdfViewer'</p>
  </blockquote>
  
  <p><code>&lt;p&gt;&lt;a href="/Home/index2"/99&gt;&lt;/p&gt;</code> if i click on this href tag this have same functionality as a href above. But there is a webapi path is different </p>
  
  <p>on passing the id the controller name gets added before.</p>
  
  <blockquote>
    <p>'localhost/home/api/PdfViewer'.</p>
  </blockquote>
  
  <p>Can anyone please suggest a solution for removing the controllername before the API.</p>