Recipe 22.17. Customizing Apache s Default Error Pages

 < Day Day Up > 

Recipe 22.17. Customizing Apache's Default Error Pages

22.17.1 Problem

You would like to use Apache's default error pages, and you want to enable Content Negotiation (discussed in Recipe 22.19) so that error messages will be delivered in the language of your site visitors. But they are sure are stern and ugly isn't there some way to dress them up, without breaking the page code?

22.17.2 Solution

The Apache maintainers think of everything. In the examples used in this chapter, the default error pages are in /var/www/error. If you go to this directory, you'll see the /include directory. This contains three files: bottom.html, spacer.html, and top.html. You may freely customize bottom.html and spacer.html with text, images, links, or whatever you desire.

22.17.3 Discussion

It's a nice service to your visitors to customize your error pages; it gives them useful information, and lets them know where in cyberspace they are. If you're thinking of completely redesigning the pages, however, it's best to create your own from scratch (see the previous recipe).

22.17.4 See Also

  • http://localhost/manual/content-negotiation.html

     < Day Day Up > 


    Linux Cookbook
    Linux Cookbook
    ISBN: 0596006403
    EAN: 2147483647
    Year: 2004
    Pages: 434

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net