legacy-knowledge-base
公開されました Sep. 10, 2025

URLから不要な部分を削除する方法/URLを短くする方法/URLを親しみやすくする方法

written-by

Alexandra Rujzam

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

問題

  • URLのweb/guest部分を削除し、
    例) http://www.example.com/web/guest/home-> http://www.example.com/home のように短縮したい。

環境

  • Liferay Portal 6.2
  • Liferay DXP 7.0-7.4

解決策

デフォルトの公開サイトベースURLは https://localhost:8080/web/<site-friendly-url>で、非公開サイトは https://localhost:8080/group/<site-friendly-url>です。

これらの部分をURLから削除するには、サイトのバーチャルホストとしてドメインを指定する必要があります:

  1. に行く必要があります。
    • DXP 7.0-7.3: 管理メニュー > 設定 > サイト設定セクション > 設定ページの「サイトURL」部分をドロップダウンします。
    • DXP 7.4: 管理者メニュー > 設定 > サイト設定セクション > サイト設定 > 左側の「サイトURL」をクリックします。
  2. 公開ページとプライベートページにバーチャルホストを指定する必要があります。
    • 例)公開ページに www.example.com を追加する。
  3. これで、トップページが http://www.example.com/home のように開きます。

注: ローカルコンピューターでテストする場合は、/etc/hostsファイルを修正してカスタムドメイン(www.example.com)を含み、127.0.0.1を指すようにする必要があります。

did-this-article-resolve-your-issue

legacy-knowledge-base