Forum OpenACS Development: Re: Capturing 404's

Collapse
2: Re: Capturing 404's (response to 1)
Posted by Tom Jackson on

Capturing 404's is a breaze nowadays, ever since this proxy request mechanism was added to AOLserver. Here's what to do:

  • Add the following configuration parameter to your config file:
    ns_section ns/server/${server}/redirects
    ns_param   404                "global/file-not-found.tcl"
    ns_param   500                "global/server-error.tcl"
    
  • Create the file-not-found.tcl page to do whatever you want.

I'm doing the same thing now to catch errors, with server-error.tcl. I'm not sure why the ns_section is called 'redirects'.