When i redirect from a Controller using
RedirectToAction("Index", "Controller");
Or Generate a link with UrlHelper
@Url.Action("Index","Controller");
In both ways the “/Index” Part is striped down from my URL.
Although for SEO Purposes i want my url to be displayed always at the same manner.
www.domain.com/en/Controller/Index
but now i get
www.domain.com/en/Controller
How can i force these two methods above always display the “/Index” Part.
P.S I know this happens because “Index” is indicated as a Default action on my route, but either way i want it to be displayed.
3
Answers
Check your configuration inside
global.asax
file. It can be like this.Maybe based on your mask you always going to default route. So just remove default mapping.
Add new role in RouteConfig with before default route with Index action
You can try do this: