# 通知用户其主题中的链接无效

**URL:** <https://meta.discourse.org/t/notify-user-of-a-broken-url-in-their-topic/270494>\
**Category:** Feature\
**Created:** [2023年七月4日 09:44 UTC](https://meta.discourse.org/t/notify-user-of-a-broken-url-in-their-topic/270494 "2023-07-04T09:44:50Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Tris20](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tris20/32/264639_2.png) [@Tris20](https://meta.discourse.org/u/Tris20)\
**Post date:** [2023年七月4日 14:04 UTC](https://meta.discourse.org/t/notify-user-of-a-broken-url-in-their-topic/270494/3 "2023-07-04T14:04:41Z")

</div>

感谢您提供这些信息。我之前搜索过，但可能使用了错误的搜索词。

这个主题看起来最有趣。

> [@How Check and Fix Broken Links?](https://meta.discourse.org/t/how-check-and-fix-broken-links/255338/):
>
> Is there any possible way to identify broken links and fix it at the same time?

特别是您自己的提议：

> [@Canapin](#):
>
> 我想到的第一个解决方案是一个 Rails 脚本，它可以遍历帖子内容，查找链接，请求它们，检查状态码并执行您需要的任何操作。删除它们，替换它们（这些操作需要重新烘焙），记录它们……

我想知道是否已经有一个内部的 URL 表。这似乎表明可能存在：

> [@Find and fix broken links](https://meta.discourse.org/t/find-and-fix-broken-links/120858/4):
>
> Thinking of the topic\_links table? [discourse/app/models/topic\_link.rb at main · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/master/app/models/topic_link.rb)

---

_[View the full topic](https://meta.discourse.org/t/notify-user-of-a-broken-url-in-their-topic/270494)._
