In Orchard, the home page has an empty string for its alias. It's possible to look up the RouteValueDictionary
of an alias by calling the IAliasService.Get()
method. Once you have this, you can simply pass it to RedirectToRoute()
.
So for the home page:
var homepage = _aliasService.Get(String.Empty);
return RedirectToRoute(homepage);
You can see Orchard using this mechanism to check the home page in the AutoroutePartDriver.cs
file lines 66 - 72 in version 1.7.2.