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

learn-legacy-article-disclaimer-text

問題

  • ハイフンを使ってフレンドリー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-urlhttps://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