mirror of
https://github.com/yawaflua/yaflay.ru.git
synced 2026-02-04 19:04:12 +02:00
Add 404 page
Some rework Robots.txt BugFixes controllers
This commit is contained in:
10
Startup.cs
10
Startup.cs
@@ -14,13 +14,19 @@ namespace yaflay.ru
|
||||
}
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.AddControllers();
|
||||
services.AddControllers()
|
||||
.AddRazorPagesOptions(options =>
|
||||
{
|
||||
options.Conventions.AddPageRoute("/RobotsTxt", "/Robots.txt");
|
||||
options.Conventions.AddPageRoute("/ErrorPage", "/404");
|
||||
});
|
||||
services.AddRouting();
|
||||
services.AddRazorPages();
|
||||
services.AddMvc()
|
||||
.AddRazorPagesOptions(options =>
|
||||
{
|
||||
options.Conventions.AddPageRoute("/robots.txt", "/RobotsTxt");
|
||||
options.Conventions.AddPageRoute("/RobotsTxt", "/Robots.txt");
|
||||
options.Conventions.AddPageRoute("/ErrorPage", "/404");
|
||||
});
|
||||
//services.AddDirectoryBrowser();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user