URL Mapping - ApacheCon 2005
Error documents in Apache 2.0
  • Apache 2.0 has a new way of handling ErrorDocument that will mean much more customizable error messages, rather than the same old boring "Document Not Found" errors.

  • In you Apache 2.0 default configuration file, you will see the following:

    
     <IfModule mod_negotiation.c>
     <IfModule mod_include.c>
        Alias /error/ "@@ServerRoot@@/error/"
    
      
    
        <Directory "@@ServerRoot@@/error">
            AllowOverride None
            Options IncludesNoExec
            AddOutputFilter Includes html
            AddHandler type-map var
            Order allow,deny
            Allow from all
            LanguagePriority en es de fr
            ForceLanguagePriority Prefer Fallback
        </Directory>
    
      
    
        ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
        ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
        ... etc ...
        ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var
    
      
    
     </IfModule>
     </IfModule>
    
      

Index
Back to CGI 404 handler
Forward to And the error documents ...

ApacheCon 2005 : URL Mapping - Slide #29 of 45