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…

bing404WP

Get the rest of the story.