I am working on a project for a local college using MVC3. I have came across a requirement at which I am stuck and can\'t find any wayout.
Let suppose my URL is www.abc
MVC does this natively.
Just create a route for it:
routes.MapRoute(
"Teacher route",
"/{teacher}",
new { controller = "SomeController", action = "SomeAction" }
)
Note that this will conflict with any other /Whatever
URLs (eg, /About
); to avoid that, you can use my MapDefaultController() extension to map a route for a specific controller before this one.