New answers tagged


If you are going to use a slash (/) in your URL, you should have content when the URL is truncated to that point. A slash in the URL commonly represents a directory. Both users and bots often shorten URLs to the slash looking for an index page. An alternative is to use dashes: /post-best_funny_videos-dkKE_wd3jJ. Dashes are not commonly understood to ...


I can't see anything wrong with serving a 404. After all, there is no content at that URL. The only other option would be to "redirect" to the correct URL, but by reversing the order of those path segments and having the slug first, that may be tricky, unless the slug is guaranteed to be unique also (in which case you wouldn't need the ID anyway). ...


You could use http code 204 "no content"

Top 50 recent answers are included