I’ve only just started using ASP.NET MVC, and I have a somewhat trivial question: it seems that each controller has an attached folder-like path, so that my site becomes mydomain.net/Home/something. Is it possible to somehow get rid of the /Home part, so that the Home controller becomes ‘default’ for my web site and it’s possible to just use mydomain.net/something instead?
I’ve only just started using ASP.NET MVC, and I have a somewhat trivial question:
Share
Sure, just define a route like so:
The only problem is what about requests for your other controllers? For example, is
/Product/Foo
A request for HomeController.Product(‘Foo’) or ProductController.Foo()?
You might need to use constraints to make the distinction clear.