URL Slugs: Redirects or 404s?
- by anonymous coward
Some sites, like here at SO, allow 'bogus' slugs in the URL. Before implementing URL slugs on my site, I have a question of 'best practices'...
Given a structure like example.com/123/article-slug-here/, if my site allows bogus slugs by querying on the ID -
Should I ...
just do a redirect to the appropriate/canonical URL (verifying the slug, and redirecting in case of a mismatch)?
-or-
return a 404, since technically example.com/123/this-article-s-u-x doesn't exist?