Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The first example is just that. Put the id in the URL and make the slug optional.

Stackoverflow makes the slug completely optional but you have the choice of only accepting foo and bar in your example




No you redirect to the right place. It’s no worse than writing obscene things in a URL fragment (after #) that doesn’t even get sent to the server.


It’s not great but it matters less when the content you get going to that page is so unremarkable. Don’t forget you can do that to any url, even of sites that don’t use optional slugs, if your goal is just vague, evil-by-link-appearance.


What is the actual harm in allowing people to put random text at the end of the url?

Not to mention something similar can be done to any url, e.g. #whatever-you-want or ?_=whatever-you-want





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: