Question: I want to have a route that looks something like: www.abc.com/companyName/Controller/Action/Id
However, all the company names need to map to the same "base" controllers, regardles of what the name is. I only need the companyName for authentication purposes.

Also, if there's no companyName provided, I need to map to a different set of controllers altogether.

How do I do this? I'd also appreciate a good routing resource so I don't have to ask questions like this.

Answer: 
```
routes.MapRoute(
    "CompanyRoute",                                        
    "{companyName}/{controller}/{action}/{id}",           
    new { controller = "MyBaseCompanyController", action = "Index", id = "" }  
);

routes.MapRoute(
    "NoCompanyRoute",
    "{controller}/{action}/{id}",
    new {controller = "DifferentDefaultController", action = "Index", id = "" });

```

Routing is quite a complex topic, but it's covered well in [Professional ASP.Net MVC 1.0](http://www.wrox.com/WileyCDA/WroxTitle/Professional-ASP-NET-MVC-1-0.productCd-0470384611.html). For online resources, I would suggest [starting here](http://www.asp.net/learn/mvc/#MVC_Routing), and then coming back to Stack Overflow ;)
Go to Global.asax.cs, and add the following route in the RegisterRoutes() method before the "Default" route:

```
routes.MapRoute(
    "Vanity",                                              // Route name
    "{company}/{controller}/{action}/{id}",                           // URL with parameters
    new { company = "", controller = "Home", action = "Index", id = "" }  // Parameter defaults
);

```