Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7087737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:42:39+00:00 2026-05-28T07:42:39+00:00

I have a website with stories in it. I can have multiple types of

  • 0

I have a website with stories in it. I can have multiple types of stories within multiple categories like:

  • children
  • romance
  • scifi
  • action
  • thriler
  • quests

The stories are accessible using urls like:

www.example.com/action/story-name-action/
www.example.com/romance/story-name-romance/

and the first param (action) and the second (story-name-action) are redirected with .htaccess using rules. This part works just fine.

Lately, I get few dozen of 404 from different sites and here’s what I want to do but I dont know how:

If someone types, for example: /action/story-nme-ction, I want to redirect to: action/story-name-action/

Is there an efficient way to implement this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T07:42:39+00:00Added an answer on May 28, 2026 at 7:42 am

    Oh man, oh man!

    What you’re asking for is not simple and need you to have a powerful computer, but the results are simply amazing.

    Here’s what I’d suggest to do:

    • For 404 proper handling, you have the ErrorDocument redirection in vhost configuration. Mine looks like this: ErrorDocument 404 /404.php ;
    • When having a 404, Apache will call /404.php with all the arguments (which bad URL and so on, dump $_SERVER to see this). You have to test if there are only two expressions in the URL / i.e. http://mysite.com/(expr1)/(expr2)/
    • If not, then do a classical 404.
    • If yes then do a SOUNDEX search with MySQL (in your 404 Php file). See query sample here.
    • Then, in this “special” 404 case, do a suggestion, like google does, i.e.: “did you mean /action/story-name-action/? if so, click on the link”.

    This a hard work, but it’s both interesting and shows your skill. Very few websites do this (I just know google actually).

    Here’s a demo on my French table that could give you an overview of how it works:

    mysql> SELECT * FROM job WHERE
    SOUNDEX( description ) LIKE SOUNDEX('Machiniste cinéma');
    +-------+--------------------+
    | id    | description        |
    +-------+--------------------+
    | 14018 | Machiniste cinéma  |
    +-------+--------------------+
    1 row in set (0.06 sec)
    
    mysql> SELECT * FROM job WHERE
    SOUNDEX( description ) LIKE SOUNDEX('Mchiniste cinéma');
    +-------+--------------------+
    | id    | description        |
    +-------+--------------------+
    | 14018 | Machiniste cinéma  |
    +-------+--------------------+
    1 row in set (0.06 sec)
    
    mysql> SELECT * FROM job WHERE
    SOUNDEX( description ) LIKE SOUNDEX('Machnste cinema');
    +-------+--------------------+
    | id    | description        |
    +-------+--------------------+
    | 14018 | Machiniste cinéma  |
    +-------+--------------------+
    1 row in set (0.06 sec)
    
    mysql> 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a PHP website like reddit, users can vote for the stories. We
I have a website where businesses can load items for sale. Then end users
I have a website that stores quotes and users can add some quotes to
So I'm building a website where basically users can write stories and each story
Im building a social networking website. A user can have pals and be able
Imagine that we have a website where users can read articles, view photos, watch
I have website, usually all looks fine but sometimes one div is on the
I have website on the server, which is not precompiled (with source code, so
I'm using jQuery. I have website feature that does an ajax search and returns
I have a website that plays mp3s in a flash player. If a user

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.