Forum Moderators: coopster
I have a custom 404 error page I have created.
What I would like is for the requested file to run through a short list I created of files that do exist. Then output matches that are close.
Something like:
"404 Error - File Not Found
You requested http://www.example.com/flie/
This file does not exist.
Did you mean:
http://www.example.com/file/"
I would imagine what I need would be some kind of spell checking application, and I create a custom dictionary of the list I want to check against.
Is this the best way of doing this, and are there any small spell checker scripts that one might suggest?
Thanks.
There are built-in functions that may help you to look for mis-spellings in a url
methopone [uk.php.net]
levenshtein [uk.php.net]
similar-text [uk.php.net]
You can use one these to check against a list of keywords or similar urls.
Andrew