By default Hosting uses generic error pages that look like the following:
- Page not found: http://static.hosting.cornell.edu/infra-error/404.shtml
- Not Authorized: http://static.hosting.cornell.edu/infra-error/403.shtml
- Application error: http://static.hosting.cornell.edu/infra-error/500.shtml
If you wish to customize these pages you have two options:
- Change the default e-mail contact
- Create custom "ErrorDocument"
1. Change the default e-mail contact
You can create a ".htaccess" file that contains (SERVER_ADMIN must be all uppercase:
No Format |
---|
SetEnv SERVER_ADMIN \[e-mail address\] |
This will change the e-mail address that is used by the default error pages.
2. Create custom ErrorDocument
If you wish to change the look/feel of the page you can create your own page and create a ".htaccess" file that contains:
No Format |
---|
ErrorDocument 404 /mycustomerror.html |
Please note that if you are using ColdFusion (or a language that modifies the status code) that you will need to also specify the proper status code i.e. "<cfheader statusCode="404">", otherwise search engines and other agents may not correctly distinguish between content that exists and does not exist (i.e. it could look like "/page-does-not-exist" is a real page and will be indexed by a search engine).
For more documentation on ErrorDocument please visit (not affiliated with Cornell):