----- Original Message ----- From: "Michael Dinowitz" <[EMAIL PROTECTED]> To: "CF-Talk" <cf-talk@houseoffusion.com> Sent: Monday, March 14, 2005 10:17 AM Subject: URL masking and application.cfc
> I've been thinking of a new method of presenting dynamic content, > specifically the list archives. At the moment you get to a single post > by > passing an ID on the url. Even if this is 'hidden' using SES Urls or the > like, your still passing something. > My idea is to use the application.cfc to 'catch' a specific type of 404 > error and in place of an error, run a page. > > Take for example this url: > http://www.houseoffusion.com/cf_lists/messages.cfm/forumid:4/threadid:38946 > In its place I want to use this url: > http://www.houseoffusion.com/cf_lists/messages_4_38946.cfm > When the onRequestStart or onRequest action is run, I'd like to change > the > page requested from messages_4_38946.cfm to messages.cfm and turn the > rest > of the url into the proper variables. Looks totally do-able and I'll be > playing with it tonight. The reason I'm mentioning it is to see if > anyone > else has done this already, anyone finds this interesting and wants to > try > it and anyone wants to comment on it. I think it's a nice usage of > application.cfc, but if others find it to be flawed, I'd like to hear it > early on. Will application.cfc be executed whenever CF fails to find the messages_4_38946.cfm page? Unless you're using a shared server you can accomplish this by specifying a missing template handler in CF Administrator and doing the work in that CF page. I've done this recently for some web sites whose URL structure was changed - we pick up the error in the missing template handler, rewrite the URL and do a redirect. There is some advantage to doing this in CF - you can run queries, for instance, if necessary for rewriting the URL. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:198761 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