A different kind of URL shortener
Today I’m launching my first Google App Engine site. While I built it largely to play with GAE, it is also useful in its own right (I like to think so anyway). It does two different things:
Link shortening without redirection. Put in a godawful long Amazon link and get back a shorter Amazon link. Works with eBay and a few others too. I welcome recipes for other sites. (For the programmers in the audience, which is most of you – yes, the processing is via regular expressions.)
It does some basic checks to confirm that the shortened URL returns the same page as the original one.
Link expansion. Put in a link from a URL shortening/redirection service, e.g.
bit.ly, and see where it redirects to. Works with a slew of popular link-shorteners, including the house brands
Some of the shortening services do offer a way to see the link target before you visit it, but they’re all different; this presents a simple unified interface to that feature.
There’s a bookmarklet too. If you have someone in your online life who frequently bombards you with, say, mile-long eBay links, tell them about it.
Ian Bicking commented :
I’ve never tried it, but I always thought if you just made the request (maybe with HEAD) you’d simply look at the Location header to see the destination (and not follow the redirect, of course).
Paul commented :
Indeed, that’s the basic recipe. In the shell I just do:
curl -I bit.ly/foo | grep ^Location
Adrian Holovaty commented :
Oooh, cool service! Thanks for putting this together, Paul.
Brian Johnson commented :
You can get amazon urls a bit shorter still by using amzn.com.
The link expansion is definitely a nice feature.