[ページが見つかりません] (404) ページをカスタマイズする方法

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Data Center - この記事は、Data Center プラットフォームのアトラシアン製品に適用されます。

このナレッジベース記事は製品の Data Center バージョン用に作成されています。Data Center 固有ではない機能の Data Center ナレッジベースは、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。

*Fisheye および Crucible は除く

要約

Learn to customize the 404 error page served by Confluence, in order to better fit the design of your site.

本ページの内容には、Atlassian ソフトウェアのカスタマイズや拡張 (CSS ルール、HTML、JavaScript の追加/変更など) を行う手順が含まれています。アトラシアン サポートの提供 の通り、Atlassia 製品に加えられたカスタマイズはサポートされません。この資料は情報提供のみを目的として提供されています。内容はお客様自身の責任でご利用ください。

If you have any questions about this or any customization, please ask the Atlassian Community or consider working with an Atlassian Solution Partner.

ソリューション

Confluence 9.x and later

404.vm file has been replaced with a Soy file after Confluence 9.x. Details on the replaced Velocity files, please see Deprecated code paths removed in 9.0

  1. Confluence サーバーをシャットダウンします。
  2. In the Confluence installation directory, find the jar file confluence/WEB-INF/atlassian-bundled-plugins/com.atlassian.confluence.plugins.confluence-frontend-X.Y.Z.jar where X.Y.Z is the confluence-frontend version.
  3. Follow the app modification steps mentioned in How to edit bundled or system plugins and modify the /includes/soy/404.soy file.
    1. The file contains a mixture of HTML and Soy template syntax. See Google Closure docs for syntax details.
    2. Make sure to jar the file back when you’re done.
  4. Start Confluence and test your changes on a staging environment before applying them to a live site.

Confluence 8.x and earlier

Modify '404.vm' or '404.soy'

Find the file 404.vm that's located in <CONFLUENCE-INSTALLATION-PATH>/confluence directory. (see Velocity Template Overview for further information about Velocity template language)

Create a Custom .jsp and Modify 'web.xml'

Find the file web.xml that's located in <CONFLUENCE-INSTALLATION-PATH>/confluence/WEB-INF directory. Edit the file and find the following line:

<error-page>
        <error-code>404</error-code>
        <location>/fourohfour.action</location>
</error-page>

Replace the fourohfour.action with the new custom .jsp page that you created. The default path is <CONFLUENCE-INSTALLATION-PATH>/confluence/.


最終更新日 2025 年 6 月 13 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.