I'm currently trying to program a URL shortener, but now I have the problem that I do not know how to program the forwarding.
I've made it so far that you can shorten a URL,
e.g. you want to truncate the URL of YouTube, then create an entry in a database that "links" the YouTube URL to a randomly generated ID, say this ID is illustrative 'dzUejsg'
Now I want to be redirected to the linked URL when entering sampleurl.com/dzUejsg
, just I do not know exactly how to do that ...
I hope you can help me. Thanks in advance for all your answers! (Sorry for bad English, I'm german.)
~ JustMarvin