title: How to hide controller name in URL when using multiple controllers in MVC?
body: <p>I have a question regarding routing in ASP.NET, MVC. If I use two or more controllers, how can I go about routing to hide both the controllernames in the URL? I've managed to hide the first controllername, but it gets tricky when I want to hide the second one. </p>
  
  <p>I figured it might not be possible since the webserver needs to know what controller to look for, therefor they require different routes in the URL, but it should be possible for the API to find the appropriate controller by just having the action-name data availible?</p>
  
  <p>RouteConfig.cs:</p>
  
  <pre><code>        routes.MapRoute(
             name: "proj",
             url: "p/{action}",
             defaults: new { controller = "Project" }
         );
  
          routes.MapRoute(
             name: "Default",
             url: "{action}",
             defaults: new { controller = "Access", action = "login" }
         );
  </code></pre>
  
  <p>The urls look as follows depending on which controller I'm in:</p>
  
  <pre><code>http://localhost:56590/create       &lt;- AccessController
  http://localhost:56590/p/overview   &lt;- ProjectController
  </code></pre>
  
  <p>This is how I want it to look when I browse the site:</p>
  
  <pre><code>http://localhost:56590/create       &lt;- AccessController
  http://localhost:56590/overview     &lt;- ProjectController
  </code></pre>
  
  <p>How can I achieve this using routing, if even possible?</p>
  
  <p>Thanks alot for any explanation :)</p>