transparent.gif (1K)hsbannertab_apps.gif (1K)hsbannertabspacer2.gif (1K)
icon_esub.gif (1K)Subscribe | icon_faq.gif (1K)FAQs | ico_lock_sm.png (1K)Account

Utilities - Multidomain Server Status Code Template

Step 1 Step 2 Step 3 Step 4

STEP 1 of 4 - prepare the utility script

STEP 2 of 4 - configure the server

  • Create or open for editing the .htaccess configuration file in the domain's (or subdomain's) "root" or top-level directory.
  • Confirm that file permissions are set to 711 (-rw-r--r--).
  • Add or modify the following ErrorDocument directives section to suit your domain.
  • Edit the /cgi-bin/path/to/nph-statuscode.cgi to suit your domain. Theoretically, any valid URL will work; however, we advise serving the script locally from each (sub)domain so that the appropriate header is returned and not an intermediary one from server redirects. This .htaccess modification should be placed in the "root" of every (sub)domain for which you want this template to supercede the default server code response pages.
  • Edit "dom=n" so that the query string parameter value matches the domain number(s) in the /cgi-bin/path/to/nph-statuscode.cgi configuration area. By default dom=0 refers to the top domain while dom=1, dom=2, etc. refer to the subdomains of any extended list.

STEP 3 of 4 - create and modify xHTML template

STEP 4 of 4 - create and modify CSS

The second step in using this tool is to configure the server:

# multi-domain customized error page handler
# comment out any undesired handlers
# refer to nph-statuscode.cgi to determine valid "dom"ain number

ErrorDocument 301 /cgi-bin/path/to/nph-statuscode.cgi?c=301;dom=0
ErrorDocument 307 /cgi-bin/path/to/nph-statuscode.cgi?c=307;dom=0
ErrorDocument 401 /cgi-bin/path/to/nph-statuscode.cgi?c=401;dom=0
ErrorDocument 403 /cgi-bin/path/to/nph-statuscode.cgi?c=403;dom=0
ErrorDocument 404 /cgi-bin/path/to/nph-statuscode.cgi?c=404;dom=0
ErrorDocument 405 /cgi-bin/path/to/nph-statuscode.cgi?c=405;dom=0
ErrorDocument 408 /cgi-bin/path/to/nph-statuscode.cgi?c=408;dom=0
ErrorDocument 410 /cgi-bin/path/to/nph-statuscode.cgi?c=410;dom=0
ErrorDocument 413 /cgi-bin/path/to/nph-statuscode.cgi?c=413;dom=0
ErrorDocument 414 /cgi-bin/path/to/nph-statuscode.cgi?c=414;dom=0
ErrorDocument 500 /cgi-bin/path/to/nph-statuscode.cgi?c=500;dom=0
ErrorDocument 501 /cgi-bin/path/to/nph-statuscode.cgi?c=501;dom=0
ErrorDocument 503 /cgi-bin/path/to/nph-statuscode.cgi?c=503;dom=0

Would you like to make a suggestion or comment regarding this utility? By all means, share your opinion on the eForum.


 
         
navtop_g.png (1K) Support | Contact | Webmaster | Privacy navprv.png (1K)navupsq.png (1K)navnxt.png (1K)
Last modified on June 29, 2008
Copyright © 2002-2008 HistoSoft Corporation.
All Rights Reserved.
Level Triple-A conformance icon, W3C-WAI Web Content Accessibility Guidelines 1.0.Valid CSS!.Valid XHTML 1.1!.

About the design of this page

If you are using a "dated", non-text browser, this page may not render properly. You should be able to read all the content; however, since the styling is achieved with cascading style sheets (CSS) and old browsers do not support CSS, you must upgrade your browser. We apologize for any inconvenience.