Managing “404/Page not found” Error on WordPress with Bing
Here’s an interesting way for WordPress developers to easily manage the “404/Page not found” error by leveraging the Bing search engine using the recently released Bing Search Library for PHP project (a wrapper on top of the Bing API, which provides a simple way to submit queries to and retrieve results from the Bing Engine). For this project, we’ve continued to work with PHP expert Cal Evans to create a scenario showing how to use the library.
The Scenario
The idea is simple: instead of sending the default WordPress “404/Page not found” error page to a user who gets the wrong page URL on your site, why not try to redirect the user to content that he or she may be looking for?
The Solution
URLs are often meaningful because they include important keywords (at least that’s a good SEO practice). So let’s try to extract those keywords from the URL, pass them on to Bing API to find the matching pages, and display smart suggestions to the user!
As a result
Tada…
A new plugin “Bing404 for WordPress” is born. Microsoft is making the plugin available through the WordPress Plugin Directory: http://wordpress.org/extend/plugins/bing-404/
Need more details?
Cal Evans has posted a tutorial on how to get started with the plugin on php|architect.
His article discusses the details about how the plugin is built.
Feel free to share feedback!
Additional links
- Bing Search Library for PHP project: http://bingphp.codeplex.com/
- Installing WordPress on Windows with the Web Platform Installer: http://www.microsoft.com/web/gallery/WordPress.aspx
- Running WordPress on Windows with SQL Server: http://wordpress.visitmix.com/
-- Jean-Christophe Cimetiere, Sr. Technical Evangelist , @openatmicrosoft
Comments
- Anonymous
November 12, 2010
Indeed a very good read! Very informative post with pretty good insight on all aspects of the topic! Will keep visiting in future too!