Add additional smart redirection functionality to the existing 404 ErrorPage
An extension to add additional functionality to the existing 404 ErrorPage. If a 404 page is called, it tries to guess the intended page by matching up the last segment of the url to all SiteTree pages. It also uses soundex to match similar sounding pages to find other alternatives.
Other DataObjects (eg: products) can be added too provided they contain a
If a 404 error is detected (note: does not work in
dev mode by default):
- It will search SiteTree for all matching URLSegments, as well as any that sound the same (using PHP's soundex()).
- If 1 exact match is found, a 301 redirect is sent.
- Else if no exact match is found, and 1 similar page is found, a 301 redirect is sent to the similar page.
- Else if more than 1 exact or similar page is found, a regular 404 page is shown and the list of possible options is shown (ie: "Were you looking for one of the following pages?") directly beneath it.
- Else a regular 404 page is shown.
- SilverStripe 4
For SilverStripe 3, please refer to the SilverStripe3 branch.
composer require axllent/silverstripe-intelligent-404
Please see Configuration.md for configuration options and documentation.