# 为什么 Discourse 论坛的 URL 这么长？可以缩短吗？

**URL:** <https://meta.discourse.org/t/why-are-discourse-forum-urls-so-long-possible-to-shortern/147418>\
**Category:** Feature\
**Created:** [2020 年4 月 9 日 14:13 UTC](https://meta.discourse.org/t/why-are-discourse-forum-urls-so-long-possible-to-shortern/147418 "2020-04-09T14:13:50Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

作者： ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
发布日期： [2020 年4 月 9 日 22:15 UTC](https://meta.discourse.org/t/why-are-discourse-forum-urls-so-long-possible-to-shortern/147418/12 "2020-04-09T22:15:02Z")

</div>

小心，这有风险，不是吗？据我回忆，我们会用某种“最佳猜测”的 hack 方式来判断 slug 是否为数字，但\_正确\_的短格式始终是

`https://forum.example.com/t/-/1999`

而不是

`https://forum.example.com/t/1999`

这主要是为了防止 URL 被随意截断时出现错误链接。我不认为应该主动向用户推广这个功能吧？🤔

---

_[View the full topic](https://meta.discourse.org/t/why-are-discourse-forum-urls-so-long-possible-to-shortern/147418)._
