I\'m implementing a slug system for my website at the moment. I plan to redirect invalid slugs to the correct on that is stored in the database. E.g.
Alternatively you could append a GET parameter to your url (if you don't mind that), and check for it in your PHP script. Something like:
http://example.com/11/right-slug?corrected-from=http://example.com/11/wrong-slug
On the same note you can use the session or cookies, but you must take care to remove them after detection.