Define your routes using regular expressions in ASP.NET MVC and Web API.