Assuming he uses folders (which would probably not be the case if he's using a framework), I believe mod_speling in apache would accomplish the same thing, without the high overhead of doing it in CF.
Russ > -----Original Message----- > From: Bader, Terrence C CTR MARMC, 231 > [mailto:[EMAIL PROTECTED] > Sent: Monday, April 23, 2007 9:48 AM > To: CF-Talk > Subject: RE: SES URL handling > > Could you put an application.cfc that checked for 404, searched the > incorrect spelled folder against the correct ones and redirected to the > closest matching folder? > > > > -----Original Message----- > From: Paul Vernon [mailto:[EMAIL PROTECTED] > Sent: Monday, April 23, 2007 8:21 > To: CF-Talk > Subject: RE: SES URL handling > > Hi Craig, > > > I totally gave up on using CF managed SES url's a while back, although > > > it might not be 100% useful for you, I'm using a windows mod_rewrite > > equivalent called Linkfreeze. > > > > http://www.helicontech.com/linkfreeze/ > > > > It dynamically re-writes all internal links in your source code as it > > delivers content via IIS, well worth checking out but there are many > > other tools to do the same thing. > > I wasn't asking about URL rewriting in the traditional sense, I was > asking about how you handle typos in the URLs... > > Eg > > http://www.myserver.com/thisiscorrect/ <--- this is ok > > http://www.myserver.com/thisiscorect/ <--- this has a typo > > Personally, I'd want them both to work with the incorrect one being > detected and corrected so that rather than serving the 404 handler, it > redirects to the relevant content. > > This example is a naive one as it could be done with URL re-write but I > want (and have developed) something more generic that could handle > pretty much any old rubbish and have a good guess as what is should > point at. I'm just not sure if there is a better way to do it. > > > As for 404 handling, it's just as it would be on any normal site. So > > far it's a much simpler solution. > > So in your case, am I to understand that if someone entered the second > URL in my example your server would simply serve the 404? If so then > again, this is not what I am talking about. > > For me, the server should have a modicum of intelligence when it is > looking at the URLs and be able to provide a closest match to the > mistyped URL. This is especially useful when you consider the spelling > of certain common words changes between countries that use the same > language where maybe z is used instead of s. There are a few exceptions > where the words are too far away from each other for this to work for > instance, Fawcett and Tap, Wrench and Spanner, Fender and Wing, Hood and > Bonnet but in these cases the standard URL rewrite stuff will work just > fine.... It's the fuzzy logic cases I'm wondering about... > > As I said, my solution to this is in the 404 handler and uses the SQL > DIFFERENCE function and a levenshtein distance algorithm to determine > which content in the DB is the closest match to that which was typed. > The DIFFERENCE function pulls out a subset of the links that are > reasonably close matches and the levenshtein algorithm then picks the > closest one. > > It seems to be effective, I was simply asking if anyone knows if there > is a better solution? > > Paul > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Upgrade to Adobe ColdFusion MX7 The most significant release in over 10 years. Upgrade & see new features. http://www.adobe.com/products/coldfusion?sdid=RVJR Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:276020 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

