Category: Is there any way to create custom error message files?

Share this post...Tweet about this on TwitterShare on Google+0Share on Facebook0

If you want ALL sites to use the same error message file names:

Do not edit anything in the step below. Just add this text:
  1. Put the following at the very end of the /etc/httpd/conf/httpd.conf.
    ErrorDocument 401 /401.html
    ErrorDocument 403 /403.html
    ErrorDocument 404 /404.html
    ErrorDocument 500 /500.html
  2. Restart the apache web server, via NodeWorx or at the command line:
    service httpd restart
  3. Create the error files in the users web space. For example, if you create a 404.html in the user’s html directory, 404 errors will show that page.
Each user will be able to create/edit his or her own error pages. If there is no 404.html file in the user’s account then a generic 404 error will be displayed.

If you want each site to be able to specify it’s OWN error message file names:

To do this you create a .htaccess file in the user’s html directory, with one of the following lines, if you only wanted to override 404 errors.

ErrorDocument 404 /404.php


ErrorDocument 404 /404.shtml


ErrorDocument 404 /index.htm

-etc. for each error.-

Web Server
Nov 12, 2012, 8:57 pmBy: InterWorx
Is there any way to create custom error message files?
10 votes, 3.00 avg. rating (59% score)
(0) Comments

Leave a Reply
Surround code blocks with <pre>code</pre>

Your email address will not be published.


Broken Link