How I made my own URL shortener
25 December, 2011 § 2 Comments
Well, this will be a short post (get it?)…
About a month ago, I registered the domain msuja.ws (as well as msujaws.com). I set up a simple page on the site that directs users to various webpages/websites about me. I’ve also been using the domain as a URL shortener, but like most lazy developers I chose the simplest and easiest route.
To do so, I uploaded an .htaccess
file that does a permanent-redirect to the longer URL. Here is the current state of the file:
To add a new shortened URL, I connect to the server via FTP and append another line.
It’s pretty easy for one person, and it’s nice to have both control over the shortener as well as letting other people know that this is a link from me that can be trusted.
Hey Hey Jared!
I haven’t made my own URL shortener; but it does sound like a great idea! I’m glad your approach is what you were looking for! I think I might have gone a little more complicated; like PHP:
That was just a proof of concept — then I would connect to a database and do a lookup of key to URL! I see some advantages such that if you wanted to add another entry/remove one you could have a manage page! Perhaps a statistics page too; but then we are feature creeping! 🙂 Love the post!
Whoops didn’t have source in sourcecode tags: