title: Route for favicon
body: <p>I have a .net mvc4 application that has a multitentant solution.
  The way this is set up is that it tries to get a file for the client, and if not found it takes the global file.</p>
  
  <p>All this works great and in my RouteConfig.cs I have this line at the very bottom:</p>
  
  <pre><code>routes.Add("FaviconRoute", new Route("favicon.ico", new StaticFileRouteHandler("favicon.ico", "Content", "", true)));
  </code></pre>
  
  <p>StaticFileRouteHandler is my custom class that loads either global or tenant file and that works great.
  However I noticed that I get a lot of erros from elmah (error handler) like this: </p>
  
  <p><code>404    Http    The controller for path '/favicon.ico' was not found or does not implement IController.</code></p>
  
  <p>So I have been trying to fix this but cant figure it out. If I put my line higher in routeconfig then it disturbes other routes (all routes becomes site.com/favicon.ico?param1...)</p>
  
  <p>I have tried using <code>routes.IgnoreRoute("{*favicon}", new { favicon = @"(.*/)?favicon.ico(/.*)?" });</code></p>
  
  <p>But then it does not run my code and so all tenants get the global file.</p>
  
  <p>I know that favicon no longer needs to be in the root if you link it, but i like this solution where my static file handler selects the right file instead of changing path to the file (I simply don't want the code sent to the client containing a path with like ~/clients/clientA/favicon.ico</p>
  
  <p>So it would be great if it could be solved with simply making my route more specific so it only catches favicon in the root and nothing else. So i can put it at the top of routeconfig.cs</p>
  
  <p>Finally if anyone want to see the full error from elmah it's here: <a href="http://db.tt/3QBxIxmb" rel="nofollow">http://db.tt/3QBxIxmb</a></p>