I want to use Areas for my RazorPage 3.1 Core project. However, I can't seem to redirect the homepage from
http://localhost:<port> to http://localhost:<port>/Default/Index and the moment I use Areas and move my Pages folder into the Areas/Default/Pages I get an obvious 404 at my homepage. Every time I launch the project I get a 404 now for the homepage.
Or am I supposed to have 1 Pages folder outside of the Areas folder with the index as seen in the image below? That would be weird.
I tried everything I could find but I can't figure it out. I think it must be set somewhere in the Startup.cs:
services.AddMvc().AddRazorPagesOptions(options =>
{
options.Conventions.AddPageRoute("/Default/Index", ""); // Or something?
});
and:
public IActionResult Get()
{
return RedirectToAction("Default/Index");
}
This didn't work for me:

