Legacy Knowledge Base
公開されました Sep. 10, 2025

スペース( )とハイフン(-)を含む2つのURLから同じレスポンスを得る。

Written By

Madhusudan Sharma

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.

問題

  • ハイフンを使ってフレンドリーURLを作成した場合(例 https://www.abc.in/test-my-friendly-url )、そして、ハイフン(-)の代わりにスペース( )を入れて、フレンドリーURLと同じURLをもう1つ(例 https://www.abc.in/test my friendly url)は、フレンドリーURLと同じレスポンスを返す。

環境

  • Liferay DXP 7.4

解像度

  • URLを作成する際、「-」(ハイフン)と「'」(スペース)は互いに等価とみなされるため、これは製品に期待される動作である。
  • 従って、https://www.abc.in/test-my-friendly-urlとhttps://www.abc.in/testのどちらのURLも同じレスポンスを返すのはこのためである。
  • さらに、「-」(ハイフン)を使わずにフレンドリーなURLを作成しようとすると(例→https://www.abc.in/test.my.friendly.urlまたは https://www.abc.in/test_my_friendly_url)、スペースを使って同じURLをヒットしようとすると(例 → https://www.abc.in/テスト・マイ・フレンドリー・URLサーバーは404エラーページで応答します。
  • また、保存されているURLは「-」(ハイフン)付きであり、クローラーは保存されているURL(ハイフン「-」付き)をチェックし、スペース付きのURLはチェックしない。 その結果、SEOにも影響しない。

追加情報

Did this article resolve your issue ?

Legacy Knowledge Base