title: MVC 5 Routing Adds Extra Slash
body: <p>i have an mvc 5 application on iis 7.5 which has a link which works properly when the application is referenced as an ip address, but not as a subdomain. so xxx.xxx.x.xx works while subdomain.mydomain.com fails. only this link, out of 9 or so on the page fails with this quirk.</p>
  
  <p>all links work except one. when I hover over the link, the status bar shows <a href="http://subdomain.mydomain.com/Projects" rel="nofollow">http://subdomain.mydomain.com/Projects</a> and when clicked lists projects when working - as seen in the routing config. i added the config item to force a route, but it fails.</p>
  
  <p>it is defined in a shared layout as</p>
  
  <pre><code>    &lt;li&gt;&lt;a href="@Url.Action("Index", "Projects")" @SiteMainMenuHelper.CurrentItem(ViewBag.SiteMainMenu, SiteMainMenu.Projects) data-icon="&amp;#xe60f;"&gt;Projects&lt;/a&gt;&lt;/li&gt;
  </code></pre>
  
  <p>the routing is</p>
  
  <pre><code>    public static void RegisterRoutes(RouteCollection routes)
      {
          routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
          ////routes.LowercaseUrls = true;
  
          // I created this first route to force the correct action but it does not work
          routes.MapRoute(
              "Projects",
              "Projects",
              new { controller = "Projects", action = "Index" });
  
          routes.MapRoute(
              "user-activation",
              "user/activate/{token}",
              new { controller = "user", action = "activate" });
  
          routes.MapRoute(
              "password-reset",
              "password/reset/{token}",
              new { controller = "password", action = "reset" });
  
          routes.MapRoute(
              "Default",
              "{controller}/{action}/{id}",
              new { controller = "Home", action = "Index", id = UrlParameter.Optional });
  
  
      }
  </code></pre>
  
  <p>however, when the subdomain is the host of the application, it lands on this url:
  <a href="http://subdomain.mydomain.com/Projects/#/" rel="nofollow">http://subdomain.mydomain.com/Projects/#/</a></p>
  
  <p>but should be
  <a href="http://subdomain.mydomain.com/Projects#/" rel="nofollow">http://subdomain.mydomain.com/Projects#/</a></p>
  
  <p>I cannot figure out from where the extra / is coming. any leads or direction on how to fix would be appreciated - especially given that everything else works. i have looked in the RouteTable in the debugger and do not see any conflicts - but i may not be looking at the table correctly.</p>