Special page to handle 404 errors

This commit is contained in:
rockstardev 2020-02-01 01:41:27 -06:00
parent fe2eca4fda
commit ef503fa907
3 changed files with 23 additions and 0 deletions

View File

@ -12,6 +12,14 @@ namespace BTCPayServer.Controllers
{
public IActionResult Handle(int? statusCode = null)
{
if (statusCode.HasValue)
{
if (statusCode.Value == 404)
{
var viewName = statusCode.ToString();
return View(viewName);
}
}
return View(statusCode);
}
}

View File

@ -0,0 +1,15 @@
@{
ViewData["ErrorTitle"] = "404 - Page not found";
}
<p class="lead-login">
This is like searching for person more beautiful than <a href="https://twitter.com/NicolasDorier" target="_blank">Nicolas Dorier</a>.
<br /><br />
<a href="https://twitter.com/NicolasDorier" target="_blank">
<img src="~/img/errorpages/404_nicolas.jpg" alt="Nicolas Dorier beauty" title="Slowly stroke the image" />
</a>
<br /><br />
It doesn't exist.
<br /><br />
You can always try <a href="/">navigating back to home</a>.
</p>

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB