This post is going to be a discussion about url shorteners, what the problems are, and how they could be useful, some potential business ideas. IT people will be familiar with these techniques, but these things are not obvious to everyone.
When someone uses a shortened url their browser go to the server which then redirects to the full url. The server has a mapping from the short url to the expanded one.
In the url http://stephenn.com/EEX23 the EEX23 is the link. You cannot use the same link for two different expanded urls. So how you generate those links becomes one of the main problems for the system. If you don't want them to look like a sequence, ie you don't want EEX24 to come after EEX23 you could randomly generate them, if that link is already used either try generating another or get the next available one in the sequence. If your a smaller host and don't have many links to shorten then this wont be an issue, however if your a big url shortener like goo.gl then these retries could get costly, you might want to precompute available links ready to be used, or you could do something clever based of the sequence. Iterate over the sequence but make sure its not sequential for one user, so they don't see the sequence.
Some features that a url shortener could provide are.
* Customisable prefix's. If your links so they appear similar, you could have a prefix for a subject.
* Collect analytics. Although the target page can collect analytics and show the referrer.
* Changing or Deleting the link after its published. Maybe for corrections.
Business Use Cases
A customisable url shortener could be good for businesses like publishers. A news paper could provide short links within their content. Or any business that does email campaigns and links to content, might want short changeable urls.
A provider could host many domains from the one url shortener server. The server could match on the host name coming in. The links only need to be unique across each host.