<p>I'd like to ignore multiple wildcard routes.  With asp.net mvc preview 4, they ship with:</p>

<pre><code>RouteTable.Routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
</code></pre>

<p>I'd also like to add something like:</p>

<pre><code>RouteTable.Routes.IgnoreRoute("Content/{*pathInfo}");
</code></pre>

<p>but that seems to break some of the helpers that generate urls in my program.  Thoughts?</p>

[{'answer_id': 30353, 'author': 'Brad Wilson', 'author_id': 1554, 'author_profile': 'https://Stackoverflow.com/users/1554', 'pm_score': 3, 'selected': False, 'text': '<p>This can be quite tricky.</p>\n\n<p>When attempting to figure out how to map route data into a route, the system currently searches top-down until it finds something where all the required information is provided, and then stuffs everything else into query parameters.</p>\n\n<p>Since the required information for the route "Content/{*pathInfo}" is entirely satisfied always (no required data at all in this route), and it\'s near the top of the route list, then all your attempts to map to unnamed routes will match this pattern, and all your URLs will be based on this ("Content?action=foo&amp;controller=bar")</p>\n\n<p>Unfortunately, there\'s no way around this with action routes. If you use named routes (f.e., choosing Html.RouteLink instead of Html.ActionLink), then you can specify the name of the route to match. It\'s less convenient, but more precise.</p>\n\n<p>IMO, complex routes make the action-routing system basically fall over. In applications where I have something other than the default routes, I almost always end up reverting to named-route based URL generation to ensure I\'m always getting the right route.</p>\n'}, {'answer_id': 30551, 'author': 'Haacked', 'author_id': 598, 'author_profile': 'https://Stackoverflow.com/users/598', 'pm_score': 5, 'selected': True, 'text': '<p>There are two possible solutions here.</p>\n\n<ol>\n<li><p>Add a constraint to the ignore route to make sure that only requests that should be ignored would match that route. Kinda kludgy, but it should work.</p>\n\n<pre><code>RouteTable.Routes.IgnoreRoute("{folder}/{*pathInfo}", new {folder="content"});\n</code></pre></li>\n<li><p>What is in your content directory? By default, Routing does not route files that exist on disk (actually checks the VirtualPathProvider). So if you are putting static content in the Content directory, you might not need the ignore route.</p></li>\n</ol>\n'}]
['https://Stackoverflow.com/questions/30302', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3085/']