Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【システム】カスタムコンテンツのエントリーにスラッグを指定すると、IDとスラッグの2種類のURLが発生する #4142

Open
build1024 opened this issue Mar 6, 2025 · 1 comment
Labels
Todo 実行確定タスク

Comments

@build1024
Copy link

概要

カスタムコンテンツのエントリーに対してスラッグを指定すると、

/items/view/{id}
/items/view/{slug}

のどちらの形式のURLでもアクセスできます。
重複コンテンツとなるため、SEOの観点から、エントリーにスラッグが指定されている場合にはURLが {slug} 側に統一されるのが望ましいと思います。

例えば /items/ というカスタムコンテンツがあって、それに紐づくテーブルの ID: 1 のエントリーに test というスラッグを指定している場合、現状では

https://example.com/items/view/1
https://example.com/items/view/test

のどちらのURLでも同じページが表示されます。

前者にアクセスすると Not Found ページが出るか、https://example.com/items/view/test にリダイレクトされる挙動となるのがよいと思います。

baserCMS version : 5.1.5

@ryuring
Copy link
Collaborator

ryuring commented Mar 6, 2025

@build1024 報告ありがとうございます。リダイレクトの方が良さそうですね。

@ryuring ryuring added the Todo 実行確定タスク label Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Todo 実行確定タスク
Projects
None yet
Development

No branches or pull requests

2 participants