O'Reilly logo

Sams Teach Yourself CGI in 24 Hours, Second Edition by Rafe Colburn

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using CGI to Create an Advanced Error Document

CGI offers you a lot of flexibility in creating custom error documents that you just don’t get from building a plain HTML error document. The problem with straight HTML is that no matter which page the user requested, or how he got to the page, he still gets the same error message. Through the use of CGI scripts, you can create dynamic error documents that provide customized content depending on what the user is looking for.

Environment Variables for Error Documents

When a CGI program is called as the result of an error, Apache (and other NCSA-compliant Web servers) set three environment variables that aren’t part of the normal CGI environment. These variables contain information about the user’s ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required