7 replies
by ilya Accepted solution
by jesus_c Accepted solution
by ilya Accepted solution
by jesus_c Accepted solution
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 500 /error-docs/500.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 error document itself should be a standard formatted HTML document that may use Server Side Includes or any other dynamic processing that is enabled in your environment. 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!
Activate .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:
Options Includes Indexes FollowSymLinks MultiViews
AllowOverride FileInfo
Order allow,deny
Allow from all
This discussion is closed to new replies.
Trending Software posts
Sort by Trending