diff --git a/modules/docs/app/VoloDocs.Web/Pages/Index.cshtml.cs b/modules/docs/app/VoloDocs.Web/Pages/Index.cshtml.cs index ccb8cce083..ca28c0ef8f 100644 --- a/modules/docs/app/VoloDocs.Web/Pages/Index.cshtml.cs +++ b/modules/docs/app/VoloDocs.Web/Pages/Index.cshtml.cs @@ -1,3 +1,4 @@ +using System; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.Extensions.Options; @@ -17,7 +18,12 @@ namespace VoloDocs.Web.Pages public IActionResult OnGet() { //TODO: Create HomeController & Index instead of Page. Otherwise, we have an empty Index.cshtml file. - return Redirect("./documents"); + if (!_urlOptions.RoutePrefix.IsNullOrWhiteSpace()) + { + return Redirect("./" + _urlOptions.GetFormattedRoutePrefix()); + } + + return Page(); } } } \ No newline at end of file