# 如何导入 bbPress images 和 links 301 重定向到 Discourse？

**URL:** <https://meta.discourse.org/t/how-to-import-bbpress-images-and-links-redirect-301-to-discourse/263312>\
**Category:** Migration\
**Tags:** bbpress\
**Created:** [2023 年4 月 30 日 12:10 UTC](https://meta.discourse.org/t/how-to-import-bbpress-images-and-links-redirect-301-to-discourse/263312 "2023-04-30T12:10:33Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

作者： ![nizar9](https://avatars.discourse-cdn.com/v4/letter/n/9e8a1a/32.png) [@nizar9](https://meta.discourse.org/u/nizar9)\
发布日期： [2023 年4 月 30 日 23:25 UTC](https://meta.discourse.org/t/how-to-import-bbpress-images-and-links-redirect-301-to-discourse/263312/2 "2023-04-30T23:25:46Z")

</div>

您好，

对于 1，您需要更改 bbpress 脚本，将头像从文件夹复制并上传到您的 Discourse 实例。您可以查看 [vbulletin 导入脚本](https://github.com/discourse/discourse/blob/main/script/import_scripts/vbulletin.rb) 来了解如何实现这一点，具体请参见第 212 行。

至于 2，这实际上会更复杂一些，因为 Discourse 无法访问外部网站的数据（例如 [http://www.demo.com](http://www.demo.com)）。因此，实现这一目标的最佳方法是保留相同的域名，并对 create\_permalinks（第 379 行）函数进行一些小的更改，以支持 postname 参数。

---

_[View the full topic](https://meta.discourse.org/t/how-to-import-bbpress-images-and-links-redirect-301-to-discourse/263312)._
