# 为 404（未找到）和 401（私密）设置不同的错误页面

**URL:** <https://meta.discourse.org/t/different-error-pages-for-404-not-found-and-401-private/155798>\
**Category:** Support\
**Created:** [2020 年6 月 24 日 11:56 UTC](https://meta.discourse.org/t/different-error-pages-for-404-not-found-and-401-private/155798 "2020-06-24T11:56:47Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

作者： ![dan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dan/32/101549_2.png) [@dan](https://meta.discourse.org/u/dan)\
发布日期： [2020 年7 月 3 日 10:58 UTC](https://meta.discourse.org/t/different-error-pages-for-404-not-found-and-401-private/155798/14 "2020-07-03T10:58:50Z")

</div>

> [@tpetrov](#):
>
> 说得对，但如果用户是匿名用户且拥有工作人员账户，我认为显示“登录”按钮是有意义的。

哦，我现在明白你的意思了。我想我可以为任何类型的错误添加一个登录按钮，只要用户未登录。但不确定是始终显示，还是仅在启用“详细 404 错误”时才显示。

---

_[View the full topic](https://meta.discourse.org/t/different-error-pages-for-404-not-found-and-401-private/155798)._
