HTML/PHP redirect to page with parameter when link doesn't exist : I'm trying to program an URL Shortener in the style of [bitLY][1], but I don't know how to redirect a user to a given site if he uses the shortened Link in a style of sampleurl.com/[ID here]


**Example:**

A user generates a short version for youtube.com let's say the ID is qzUdijE now I want that another user is able to visit sampleurl.com/qzUdijE for being redirected to youtube.com

(I save the ID (in this case 'qzUdijE') together with the URL (in this case 'youtube.com') in a Database.)


Thanks for all answers.
(Sorry for bad English, I'm german)

~ justMarvin


  [1]: https://bit.ly/