mirror of
https://github.com/yawaflua/yaflay.ru.git
synced 2025-12-11 16:16:26 +02:00
Add 404 page
Some rework Robots.txt BugFixes controllers
This commit is contained in:
32
Pages/ErrorPage.cshtml
Normal file
32
Pages/ErrorPage.cshtml
Normal file
@@ -0,0 +1,32 @@
|
||||
@page
|
||||
<!DOCTYPE html>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Page not found</title>
|
||||
<link rel="shortcut icon" type="image/png" href="#">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" />
|
||||
<link rel="stylesheet" href="~/css/404.css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@{
|
||||
string path = $"{this.Request.Scheme}://{this.Request.Host}";
|
||||
}
|
||||
<div class="error">
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-lg-7 text-center">
|
||||
<img src="~/img/error-404.png" alt="image 404">
|
||||
<h2><b>404</b> Страница не найдена</h2>
|
||||
<p>посетите главную страницу <br> возможно вы найдёте её</p>
|
||||
<a href="@path" class="cmn-btn mt-4">На главную</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
12
Pages/ErrorPage.cshtml.cs
Normal file
12
Pages/ErrorPage.cshtml.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
|
||||
namespace yaflay.ru.Pages
|
||||
{
|
||||
public class Index1Model : PageModel
|
||||
{
|
||||
public void OnGet()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
Layout = null;
|
||||
this.Response.ContentType = "text/plain";
|
||||
}
|
||||
# /robots.txt file for http://www.hanselman.com/
|
||||
# /Robots.txt file for httpы://yaflay.com/
|
||||
User-agent: *
|
||||
<environment include="Development,Staging">Disallow: /</environment>
|
||||
<environment include="Production">Disallow: /* </environment>
|
||||
Reference in New Issue
Block a user