我的常规 url 布局如下所示:
http://localhost:1337/Site1
http://localhost:1337/Site2
http://localhost:1337/Site3
现在我想在 /Views/ 目录的单独子文件夹中创建管理。因此 URL 应如下所示:
http://localhost:1337/Administration/AdminSite1
http://localhost:1337/Administration/AdminSite2
http://localhost:1337/Administration/AdminSite3
这显然不适用于仅在 Views 目录中创建子文件夹。
这是我的视图文件夹的样子:
/Views/Site1/Index.cshtml
/Views/Site2/Index.cshtml
/Views/Site3/Index.cshtml
/Views/Administration/AdminSite1/Index.cshtml
/Views/Administration/AdminSite2/Index.cshtml
/Views/Administration/AdminSite3/Index.cshtml
相应的控制器文件夹:
/Controllers/Site1Controller/
/Controllers/Site2Controller/
/Controllers/Site3Controller/
/Controllers/Administration/AdminSite1Controller/
/Controllers/Administration/AdminSite2Controller/
/Controllers/Administration/AdminSite3Controller/
我该如何处理?