# 古いサイトをそのまま残し、古いリンクをdiscourse内で機能させるにはどうすればいいですか？

**URL:** <https://meta.discourse.org/t/keep-old-site-in-place-and-have-old-links-work-within-discourse/304474>\
**Category:** Product Support\
**Created:** [2024 年 4 月 18 日午後 2:27 UTC](https://meta.discourse.org/t/keep-old-site-in-place-and-have-old-links-work-within-discourse/304474 "2024-04-18T14:27:58Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![dsims](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dsims/32/485916_2.png) [@dsims](https://meta.discourse.org/u/dsims)\
**Post date:** [2024 年 4 月 23 日午前 2:17 UTC](https://meta.discourse.org/t/keep-old-site-in-place-and-have-old-links-work-within-discourse/304474/8 "2024-04-23T02:17:56Z")

</div>

テーマコンポーネントが作成されました！指定された正規表現に一致する `hostname` への `href` を検索し、内部ルーティングをスキップするために `window.location` を設定する `click` イベントを追加します。

> **[GitHub - dsims/discourse\_force\_location: Theme component to set window.location on matching...](https://github.com/dsims/discourse_force_location)**
>
> Theme component to set window.location on matching internal hrefs

---

_[View the full topic](https://meta.discourse.org/t/keep-old-site-in-place-and-have-old-links-work-within-discourse/304474)._
