legacy-knowledge-base
公開されました Jul. 2, 2025

なぜLiferayは私のウェブサイトで/web/guest/homeへのredirectUrlを注入するのでしょうか?

written-by

Alfonso Crisci

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

learn-legacy-article-disclaimer-text

問題

  • Liferay DXPで作成されたWebサイトのトップページのHTMLソースを開くと、以下のスクリプトが注入されていることに気づくかもしれません:
    Liferay.Session = new Liferay.SessionBase({
    autoExtend: !0,
    redirectOnExpire: !0,
    redirectUrl: "https://www.myproductionwebsite.com/web/guest/home",
    sessionLength: 900,
    warningLength: 0
    });
  • 現実のシナリオでは、/web/guest/homeというパスが存在しない場合がほとんどで、その結果、DXPユーザーはセッション終了時に存在しないページに移動してしまうからです。

Environment

  • Liferay DXP 7.0+

解決策

  • ポータルのインターフェースから /web/guest/home の部分を活用することができます。左 製品メニュー > コントロールパネル > 設定 > インスタンス設定 > 設定 > ナビゲーション > ホーム URL では、ツールチップに次のように記載されています:

    "Liferay "インスタンスのトップページです。 例えば、ホームページを http://localhost:8080/web/guest/homeにしたい場合は、これを /web/guest/home に設定します。"

追加情報

did-this-article-resolve-your-issue

legacy-knowledge-base