If you often publish links on Twitter or via SMS, then you know about the benefits of short URLs (Unified Resource Locator). Although there are some free services of bit.ly and others, if you already have the resources, such a function is written very fast for your own web server. With Apache, mod_rewrite and PHP the basic functionality is done in a few minutes.
Such an URL shortener works simple. On calling the script, an individual ID is generated which will represent the original link. Both will be written in the .htaccess file where Apache does a lookup where to go, that’s all. Have a look around, you’ll find some useful classes on the wire.

A much better comfort offers YOURLS for example, a freeware written in PHP and with some plugins available for WordPress. The installation is fast and easy and you’ll be able to offer this service also to your visitors through a public frontend.

Such a shortener only makes sense if your domain doesn’t look like //www.i-am-the-happiest-guy-in-the-world.net/. Since I still have a few short domains available, I use these now for an own URL shortener:

For example, instead of typing //www.facebook.com/profile.php?id=733866950 you’ll also get access to my Facebook profile via //vn7.de/fbal – as long as you’re logged in there.

Feel free to try it, enjoy it and let me know about if something doesn’t work like expected … ­čÖé

Paste here the URL to shorten:

 

VN:F [1.9.11_1134]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.11_1134]
Rating: 0 (from 0 votes)
Share and Enjoy:
  • Print
  • Digg
  • StumbleUpon
  • del.icio.us
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks