# Migrate a XenForo forum to Discourse

**URL:** https://meta.discourse.org/t/migrate-a-xenforo-forum-to-discourse/45232
**Category:** Sysadmins
**Tags:** how-to
**Created:** [6월 4, 2016, 1:38오전 UTC](https://meta.discourse.org/t/migrate-a-xenforo-forum-to-discourse/45232 "2016-06-04T01:38:22Z")
**Posts on this page:** 1
**Showing post:** 106

<div class="post-metadata">

### Author: ![Tealk](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tealk/32/525923_2.png) [@Tealk](https://meta.discourse.org/u/Tealk)
#### Post date: [9월 13, 2024, 3:32오후 UTC](https://meta.discourse.org/t/migrate-a-xenforo-forum-to-discourse/45232/106 "2024-09-13T15:32:42Z")

</div>

xenforo 링크가 사용할 수 없게 되지 않도록 rewrite를 시도해 보았는데, 그 결과가 다음과 같습니다.

영구적인 rewrite를 작성하기 위해 다음 도움을 받았습니다: [Set up Let’s Encrypt with multiple domains / redirects](https://meta.discourse.org/t/set-up-let-s-encrypt-with-multiple-domains-redirects/56685) 그리고 @pfaffman의 조언도 참고했습니다.

```plaintext
hooks:

...

  after_ssl:
    - replace:
        filename: "/etc/nginx/conf.d/discourse.conf"
        from: /#\s*auth_basic_user_file\s*.*;/
        to: |
          # auth_basic_user_file /etc/nginx/htpasswd;

          location /threads/ {
            rewrite ^/threads/(.*)\.\d+/?$ /t/$1 permanent;
          }

```

---

_[View the full topic](https://meta.discourse.org/t/migrate-a-xenforo-forum-to-discourse/45232)._
