Forum OpenACS Q&A: How do u redirect a miss url to a page?

Collapse
Posted by bobby b on
Does anyone know how I can get aolserver to redirect the browser to a
fixed "sorry, the page does not exist" page, when the user tries to
access a page that doesnt exist?
Collapse
Posted by Jason Khong on
According to http://www.aolserver.com/docs/admin/config-reference.tcl.txt you just need to have
#
# Internal redirects
#
ns_section "ns/server/${servername}/redirects"
ns_param   404 "/notfound.html"      ;# Not Found error page
ns_param   500 "/servererror.html"   ;# Server Error page
in your aolserver config file. Works great for me :) As an extra, you might want to consider having the error pages send you an email or put a note into the log.
Collapse
Posted by Peter Alberer on

in the aolserver config file you can specify:

ns_section ns/server/${server}/redirects
    ns_param   404                global/file-not-found.html
    ns_param   403                global/forbidden.html

when using openacs you should probably use:

ns_section ns/server/${server}
    .... cut ....
    ns_param   NotFoundResponse   /global/file-not-found.html
    ns_param   ServerBusyResponse /global/busy.html
    ns_param   ServerInternalErrorResponse /global/error.html
    ns_param   ForbiddenResponse  /global/forbidden.html
    ns_param  UnauthorizedResponse            /global/unauthorized.html
Collapse
Posted by Bruno Mattarollo on

This has been asked before... Check this thread for more information.