99% of the people who visit a web site don’t care how it works, or how it was built. They don’t care if you’re using ColdFusion or PHP, and they don’t care if you’re using post or get variables. The remaining one percent comprises some techie types like me, and probably you, and some people with less than honourable intentions. [...]
Instead of using all the URL shortening services out there, I thought it would be just as easy to write my own, and retain my own domain in the URL. My domain name is not that short, but since I would only be using it to redirect to my own pages, I would only need a few characters to create the links. I use Apache as a webserver, and Mango Blog as an engine. This method, however, also works with BlogCFC, another popular, and awesome, ColdFusion blog engine. Both these blog engines use UUIDs as primary keys in the blog entry tables. I added an integer field in the entry table called “pk”, and made it the primary key with auto-increment turned on. This gives all your blog entries a numeric index. The next step is to create a file somewhere on your site with some code to redirect requests that use your URL shortening service. I called it trimURL.cfm.
read more