While Apache has a mod_speling module, I don't believe it will work with SES
urls.  It will fix up slight typos of the file names,etc. 

I'm not sure about the algorithms you're using, but it sounds OK to me.  Are
you experiencing a significant performance hit using your algorithm?  Why
are you looking for a better way?

An alternative solution, I believe, would be to use Lucene, and build an
index of your SES url's and then I believe you can use "Did you mean"
(similarity scores) functionality to grab the most likely URL.  This might
perform better then the SQL equivalent. 

Russ

> -----Original Message-----
> From: Paul Vernon [mailto:[EMAIL PROTECTED]
> Sent: Monday, April 23, 2007 9:21 AM
> 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
> 
> 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 & 
Flex 2
Free Trial 
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:276014
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to