public ActionResult Full(SiteViewId id) { Uri uri = this.Request.Url; if (uri.Host.StartsWith("www.", StringComparison.OrdinalIgnoreCase)) { int index = uri.AbsoluteUri.IndexOf("www."); string url = uri.AbsoluteUri.Remove(index, "www.".Length); return(this.Redirect(url)); } string requestPath = this.Request.Path.Trim(Path.AltDirectorySeparatorChar); string applicationPath = (this.Request.ApplicationPath ?? Path.AltDirectorySeparatorChar.ToString(CultureInfo.InvariantCulture)).Trim(Path.AltDirectorySeparatorChar); if (id == SiteViewId.Home && string.Equals(requestPath, applicationPath, StringComparison.OrdinalIgnoreCase) && this.Request.IsMobile()) { // return this.RedirectToAction("Mobile", new { id = id.ToString() }); } return(this.View("Full.{0}".FormatInvariant(id.ToString()))); }
public ActionResult Mobile(SiteViewId id) { return(this.View("Mobile.{0}".FormatInvariant(id.ToString()))); }