title: ASP.NET MVC Routing - It redirects when I don't want it to
body: <p>I'm building a simple search engine with the following URLs:</p>
  
  <pre><code>"/" - this is the homepage with the search textbox and submission button.
  "/search?q=" - this is where the results will appear. The query is the q= parameter.
  </code></pre>
  
  <p>This is my search controller:</p>
  
  <pre><code>[HandleError]
  public class SearchController : Controller {
  
      public ActionResult Start() {           
          SearchModel model = new SearchModel();
          return View( model );
      }
  
      /// &lt;summary&gt;Performs a search.&lt;/summary&gt;
      /// &lt;param name="q"&gt;The search query.&lt;/param&gt;
      /// &lt;param name="a"&gt;The search action ("I Feel Lucky", etc).&lt;/param&gt;
      /// &lt;param name="page"&gt;The results page number.&lt;/param&gt;
      public ActionResult Search(String q, String a, String page) {
          return View();
       }
  }
  </code></pre>
  
  <p>Finally, this is my routing table:</p>
  
  <pre><code>public static void RegisterRoutes(RouteCollection routes) {         
      routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
      routes.MapRoute(
          "SearchQuery",
          "Search", // match "http://mysite.com/Search"
          new { controller = "Search", action = "Search" }
      );
      routes.MapRoute(
          "SearchStart", // Route name
          "", // match "http://mysite.com/"
          new { controller = "Search", action = "Start", id = UrlParameter.Optional } // Parameter defaults
      );
  }
  </code></pre>
  
  <p>However, when I make a HTTP request for <code>http://mysite.com/Search?q=foo</code> I get a 301 redirect to <code>http://mysite.com/Search/</code> where a 404 is returned. My <code>SearchController</code>. <code>Search</code> action is never invoked.</p>
  
  <p>What do I need to do to allow for what I'm doing?</p>