Barney Boisvert wrote: > Just need a database that records an ID and a full URL, a form that > will accept a URL and return the matching ID, and a script that will > accept an ID and CFLOCATION to the associated URL. Pretty simple > really. > > Probably want to dress the redirect script up with mod_rewrite or > something so you can do myDomain.com/go/myUrlId, rather than > myDomain.com/go.cfm?id=myUrlId, but that's a bonus.
For what it's worth, I've done this in Apache with a 404 error page - the only problem with that is it is a 404 error =) so something like www.foo.com/index.cfm would contain your tinyurl creation form and then the url could be www.foo.com/523 Apache can't find a file or directory named 523 so it loads the 404 error page, which I've configured to be "/404.cfm". The main url is still available, so then I just <cfset urlid = getFileFromPath(cgi.script_name) (or cgi.path_info, I can't remember which) and do the database query and then redirect. mod_rewrite is probably much nicer way to do it =) Rick ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:213792 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54