i have different objects with there id's, all id's are unique.
objects
- photo
- feed
- event
- comment
all of there id's are unique and never repeated again.
i want to pass that id in url like this: http://domain.com/{object_id} and object id should tell me, which object it belongs to and what it id is. maybe doing it through php.
i read somewhere that it can be done it through base_convert with prepending text or different id. not sure.
edited:
current ids and url
- photo - http://domain.com/654156165165
- feed - http://domain.com/654156165164
- event - http://domain.com/654156165163
- comment - http://domain.com/654156165110
lets say we are on this page http://domain.com/654156165165, how would we know if this is id of photo, feed, event or comment?
solution 1 i was thinking about
- reproduce the id with prepend/append some integer, to identify which object it belongs to
- page is requested with new id http://domain.com/654646545412
- check with php which object this id belongs to and what was the actual id of that object (after removing prepended/appended integer)
Just query a database for the object details. I am sure you have object type stored there.