Results 1 to 5 of 5
  1. #1
    ...and a Pirate's heart. Convergence's Avatar
    Join Date
    June 24th, 2005
    Posts
    6,918
    How to correct/fix search query typos using .htaccess
    Hello brainiacs!

    Get a lot of users who mistype phrases in their search queries. Am trying to use .htaccess to rewrite the mistyped word within the query so the search results have the correctly spelled word and not the typo.

    IE:

    User types in doubl edged sword or knife with doubl edge

    Want to be able to replace doubl with double automatically using .htaccess -

    Any clues?

    Thanks!
    Salty kisses, Sandy toes, and a Pirate's heart...

  2. #2
    ABW Ambassador ladidah's Avatar
    Join Date
    October 15th, 2007
    Location
    MA
    Posts
    1,888
    I would set up canonical meta tags to tell robots which one is the correct query instead of putting in .htaccess.

    What if the query has missing letters, but also mistakes? "doble eged swords"
    If you set up in .htaccess for all possible corrections, your .htaccess will be looooong.

    Official Google Webmaster Central Blog: Specify your canonical

  3. #3
    ...and a Pirate's heart. Convergence's Avatar
    Join Date
    June 24th, 2005
    Posts
    6,918
    Quote Originally Posted by ladidah View Post
    I would set up canonical meta tags to tell robots which one is the correct query instead of putting in .htaccess.

    What if the query has missing letters, but also mistakes? "doble eged swords"
    If you set up in .htaccess for all possible corrections, your .htaccess will be looooong.

    Official Google Webmaster Central Blog: Specify your canonical
    Thanks, ladidah -

    Don't think that helps. The search query displays in a search results page with anywhere from two to two thousand (paginated) results.

    Want to catch the most popular typo search queries - about 40 words before the incorrect results are displayed...
    Salty kisses, Sandy toes, and a Pirate's heart...

  4. #4
    Newbie
    Join Date
    October 4th, 2011
    Location
    Chicago, Illinois
    Posts
    6
    I can not think of any good way of doing this without seriously jeopardizing site speed. You would have to set up a rewrite condition and rule for every possible combination.

    If you must use .htaccess you may want to look up how to implement a RewriteMap.

    This would be best handled on the server side. Here you have lots of flexibility and options but will require programming and probable database work.

  5. #5
    ...and a Pirate's heart. Convergence's Avatar
    Join Date
    June 24th, 2005
    Posts
    6,918
    Thanks, Jason!

    Will take a gander and try it out...
    Salty kisses, Sandy toes, and a Pirate's heart...

  6. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Replies: 0
    Last Post: February 25th, 2009, 02:51 PM
  2. Embarrassed about your TYPOS on ABW???
    By Linda - 5starAffiliatePrograms in forum Midnight Cafe'
    Replies: 18
    Last Post: June 21st, 2004, 07:48 AM
  3. Dear Linkshare, please fix the Search Engine!?!
    By HumbleFish in forum Rakuten LinkShare - LS
    Replies: 9
    Last Post: April 23rd, 2004, 08:10 AM
  4. too many typos here
    By in forum Midnight Cafe'
    Replies: 16
    Last Post: July 28th, 2002, 06:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •