Dealing with multiple custom routes in MVC
<p>I have my Home controller set up like this, going into different functions depending on the parameters it recieves.<br>
Problem is in my home controller, it treats "gametwo" as a query for my route on my home controller.</p>

<p>Example<br>
mysite.com/serchsomething &lt;-- This will search the given string<br>
mysite.com/gametwo &lt;-- This also searches instead of going to gametwo controller</p>

<p>I have normal routeconfig.cs file, with just added attributeroutes.</p>

<p>What is the best way of dealing with routes with multiple parameters? So that they wont be ambigious or crash with any other routes? thanks</p>

<p><strong>home controller</strong></p>

<pre><code>    public ActionResult Index()
    {
        ...
    }

    [HttpGet]
    [Route("{Query}")]
    public ActionResult Index(string Query)
    {
        ...
    }

    [HttpGet]
    [Route("{Query}/{Version}")]
    public ActionResult Index(string Query, int Version)
    {
        ...
    }
</code></pre>

<p><strong>GameTwo controller</strong></p>

<pre><code>    [Route("GameTwo")]
    public ActionResult Index()
    {
        return View();
    }
</code></pre>

<p><strong>routeconfig</strong></p>

<pre><code>    public static void RegisterRoutes(RouteCollection routes)
    {
        routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

        routes.MapMvcAttributeRoutes();

        routes.MapRoute(
            name: "Default",
            url: "{controller}/{action}/{id}",
            defaults: new {
                controller = "Home",
                action = "Index",
                id = UrlParameter.Optional }
        );
    }
</code></pre>