Legacy Knowledge Base
公開されました Jul. 2, 2025

エラーコード用のカスタムランディングページを使用する場合、URLに/image/があると動作しません。

Written By

Justin Choi

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

問題

  • 404 Errorコードを表示するカスタムランディングページをデザインする場合、URL文字列に/image/を含む無効なURLは、 /webapps/ROOT/html/portal フォルダまたはサイトページのいずれかに置かれたカスタマイズページを表示します。

環境

  • Liferay DXP 7.0、7.1

解像度

  • これは意図した行動です。
  • localhost:8080/web/guest/abcのような存在しないURLにアクセスした場合、ページが見つからないため、カスタム「見つからない」ページを表示します。
  • しかし、 /image/ はサーブレットマッピングです(ここで見られるように、 https://github.com/liferay/liferay-portal/blob/7.0.x/portal-web/docroot/WEB-INF/web.xml#L940-L943)。 localhost:8080/image/abcなどのURLを叩くと、 WebServerServlet を起動し、ドキュメントライブラリ内で画像を探そうとします。
  • ページ自体は存在する( WebServerServletを含む)が、画像は存在しないので、カスタム404 "not found" ページは表示されず、代わりにLiferay DXP 7.0 の標準 "resource not found" ページが表示されます。

追加情報

Did this article resolve your issue ?

Legacy Knowledge Base