Place your text ad here.
World class File Recovery and renowned raid recovery services
WestNIC provides reliable web hosting services
Ahosting.biz reseller hosting, managed dedicated server with 24/7 support
The Apache Web server allows site managers to customise error pages for HTTP errors by number. This error 400 bad request, means that a request for a URL has been made but the server is not configured or capable of responding to it. This might be the case for URLs that are handed-off to a servlet engine where no default document or servlet is configured, or the HTTP request method is not implemented.
Plus other Apache custom error page articles.
For standard use, this custom error page can be configured with a single line in the .htaccess file for the relevant directory, as shown below. If this instruction is given in the root level directory, it applies to all subdirectories.
.htaccess
ErrorDocument 400 /error-docs/400.shtml
The file path must lead with a forward slash relative to the document root for the server or virtual host. In this example, error-docs is a sub-directory of the document root.
The custom error document itself should be a standard formatted HTML document that may use Server Side Includes or any other dynamic processing. Bear in mind, however, that if errors occur in the delivery of such dynamic documents your visitors may witness an even less friendly aspect to your site!
jserv.conf
To configure the Apache JServ servlet engine to serve custom error pages in the servlet zone, the ErrorDocument directive must be declared in specific Location sections in the jserv.conf configuration file. The file references point to directories in the document path for the main HTTP server, as above:
<Location /servlets>
ErrorDocument 400 /error-docs/400.shtml
ErrorDocument 403 /error-docs/403.shtml
ErrorDocument 404 /error-docs/404.shtml
ErrorDocument 500 /error-docs/500.shtml
</Location>
<Location /servlet>
ErrorDocument 400 /error-docs/400.shtml
ErrorDocument 403 /error-docs/403.shtml
ErrorDocument 404 /error-docs/404.shtml
ErrorDocument 500 /error-docs/500.shtml
</Location>
Note, the servlet engine must be stopped and restarted to initiate these changes.
.htaccess settings
To enable .htaccess files to override the server's http.conf settings, the default host must have the AllowOverride FileInfo property set in its Directory directive. Your configuration should look something like this:
<Directory "C:/apache/httpd/htdocs/manual"> Options Includes Indexes FollowSymLinks MultiViews AllowOverride FileInfo Order allow,deny Allow from all </Directory>
If your Web server is issuing HTTP errors, you may find the answer to your problem in the following extract from our extensive FAQ section.