How to change all the customised error pages quickly?

wheatgrass

Verified User
Joined
Mar 31, 2006
Messages
16
All my error pages (401.shtml, 403.shtml, 404.shtml, etc.) are customised such that they are the same. Everytime I change one, I have to change all. Is there a way to change one and make the changes reflect in all automatically?
 
They're all separate files.

Are you asking how to make separate pages for each error work for all domains?

If so, then you could create one set somewhere and use links to them for all your sites.

Or are you asking how to make one page work for all errors? If so you could create the page to call either a separate .shtml or .php page which would parse the error from the way it's called, and present the proper information.

Or how about creating a local PHP program (on your desktop system) that would take one master you write, and automatically create multiple pages and upload them?

Jeff
 
Yes, I'm asking how to make one page work for all errors. How do I create the page to call either a separate .shtml or .php page which would parse the error from the way it's called, and present the proper information? Or can I simply do a soft link from 404.shtml to 400.shtml, for example?
 
Creative html programmers out there are welcome to respond; I don't fit that description; when I need an html programmer I hire one :) .

Jeff
 
Look in your main httpd.conf (in /etc/http/conf/httpd.conf) or in an .htaccess file at the top of your domain (for domain specific only).

Set it up so that it says:

ErrorDocument 403 /errors/general_error.html
ErrorDocument 404 /errors/general_error.html
ErrorDocument 500 /errors/general_error.html

pointing to the same page
 
Back
Top