Bing search helps PHP developers remedy 404 error pages

Bing search helps PHP developers remedy 404 error pages

  • Comments 1

As many of you know, most large web sites that feature lots of content often experience traffic that is looking for pages that either don’t exist or have been moved. But did you know that the percent of traffic that causes web servers to return a generic 404 error page or sitemap is as much as 2 to 10 percent? That’s an awful lot of viewers experiencing a dead end as a result of nonexistent or relocated pages.

However, the Bing 404 Web Page Error Toolkit for PHP, which was debuted at the Web 2.0 Expo in New York today, helps developers better manage 404 errors by dynamically creating a customizable page that contains error messages and search results that are seeded with relevant keywords from Microsoft’s Bing search engine. This page ultimately helps web site visitors move past the missing page and find the information they need.

The Bing 404 Web Page Error Toolkit for PHP is a customizable PHP application that replaces the default error page on Microsoft IIS or Apache web servers with Bing search results that are based on keywords that have been derived from the URL requested by the user. The toolkit is available on Codeplex as an open source project, and is released under the Microsoft Public License.

Say, for example, a user requests a page with the URL “someURLontheweb.com/interoperability/bridges,” and the URL doesn’t exist. The toolkit dynamically creates a page like this one:

clip_image002

The process works in this way:

  1. The web server identifies a 404 “page not found” error and executes the toolkit.
  2. The toolkit extracts keywords from the URL (“interoperability” & “bridges” in this case) and returns them, along with the error page, to the viewer's browser.
  3. The browser sends a search request to the Bing API via a JavaScript call that includes the extracted keywords.
  4. The Bing API returns the appropriate results to the browser.
  5. The browser renders the results via JavaScript in the context of the page that the developer has customized.

You can see an overview of the architecture, the configuration steps, and a quick demo of the toolkit in the following Channel9 video:

Get Microsoft Silverlight

The toolkit is very easy to install and use, with very little customization necessary. Feel free to check the project site on Codeplex http://bing404php.codeplex.com. As always your feedback is welcome!

.NET developers—note that a similar kit for ASP.NET is available for ASP.NET here.

—Sumit Chawla, Technical Product Manager/Architect, Microsoft Interoperability Team

Leave a Comment
  • Please add 8 and 4 and type the answer here:
  • Post
  • Loading...