title: MVC RouteConfig allow /Controller/Action.html
body: <p>I have an MVC application and am using the standard routeconfig that routes /Controller/Action/Id</p>
  
  <p>I want it to additionally capture <code>/Controller/Action.html</code> as the url and as well and point to <code>/controller/action</code> also.</p>
  
  <p>I am using a jquery library that I have no control over, and a function requires a url that points to a webpage or an image. However, it doesn't appear to understand that ends without an extension(.html, .php etc) is a link to html and throws an error.</p>
  
  <p>Edit: I tried as the commenter below suggested, and still can't seem to get it to work. Here is my route config.</p>
  
  <pre><code>public class RouteConfig
  {
      public static void RegisterRoutes(RouteCollection routes)
      {
          routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
  
          routes.MapRoute("routeWithHtmlExtension",
              "{controller}/{action}.html",
              new { controller = "Home", action = "Index" }
          );
  
          routes.MapRoute(
              name: "Default",
              url: "{controller}/{action}/{id}",
              defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
          );
      }
  }
  </code></pre>
  
  <p>This Url works:</p>
  
  <pre><code> http://localhost:14418/Album/Test
  </code></pre>
  
  <p>This one does not:</p>
  
  <pre><code> http://localhost:14418/Album/Test.html
  </code></pre>