Currently everything under homecontroller appears in the URL as
example.com/Home/{Action}
Is there a way we can keep all other routing the way it is but ONLY special case home controller so everything under home comes under the domain.
like
example.com/about
example.com/contact
example.com/error
instead of creating new controller classes for each of them.
EDIT:
The other URL’s like
example.com/user/details/123
example.com/user/edit/123
Which are in the userController should work the same as they are now
I think the best way is:
and when you want to create a link, use:
OR:
instead of:
this works for me, and should work for you too.
you can create a symbol like
@(or-or anything else), before theactionpart in url, to make the url unique, such as:in this way, your urls are different from the Default map-route and you can create urls like:
but the first, in my idea, is better and I always use that.