title: MVC Attribute routing, redirecting old urls
body: <p>I have just upgraded from MVC 4 to 5 and started using attribute routing.
  It works perfect and is easy to implement.</p>
  
  <p>But since the website has been up for a few months theres a number of links to the website, including from search engines.
  The old urls will not work so I need to redirect them permanently.
  I'm not sure what the best way would be. I thought that if I created a route in the route.config, this would work as a backup for the routing attribute. But it seems to be only one that works (first served).</p>
  
  <p>Example.. 
  Old url: /bank/5
  New url: /superbank/5</p>
  
  <p>The attribute route looks like this: </p>
  
  <pre><code>[Route("superbank/{id}")]
  </code></pre>
  
  <p>And the route.config:</p>
  
  <pre><code>routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
  routes.LowercaseUrls = true;
  
  routes.MapMvcAttributeRoutes();
  
  routes.MapRoute(
              "BankDetails",
              "bank/{id}",
              new { controller = "Home", action = "bank" }, //the action is still called bank, not superbank
              new { id = @"^\d+$" } 
  );
  </code></pre>
  
  <p>With this code, only superbank/5 will work, not bank/5
  If I put MapMvcAttributeRoutes() beneath the MapRoute, neither of the urls will work and all urls in the project will be created and pointing to bank/5.</p>
  
  <p>Any ideas?
  Should I use global.asax or IIS url rewrite?</p>