HOW TO: Build Your Own URL Shortener in 2 Steps
First, pick up a domain you’d like to use for your short urls – i.e. mine.url – and turn on a webserver.
To Receive a Shortened URL for your domain from Cullect:
Add the Cullect Item Stats javascript widget to an HTML page, passing it a long URL and your domain:
<script type="text/javascript" src="http://cullect.com/item.js?only_link=1&link=[the-really-long-url]&domain=mine.url"></script>
To Redirect a Shortened URL from your domain
Add the Cullect redirect to your .htaccess file:
RewriteRule ^(l?[0-9]*)$ http://cullect.com/redirect/$1?domain=mine.url [L]
You now have your own custom domain URL shortener with all the bells and whistles Culld.us has. For extra credit – play around with the options in the Cullect Item Stats widget
comments
One Response to “HOW TO: Build Your Own URL Shortener in 2 Steps”
Leave a Reply
[...] HOW TO: Build Your Own URL Shortener in 2 Steps [...]