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 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?
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
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!
- 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