Add a new javascript instance (if you don't know how to do this, refer to the CookBook.HelloWorld recipe) called common . Add the following code to it:
zimki.errorPage(404, notFound);
function notFound(path) {
return "The path '" + path + "' does not exist\n";
}
Now visit any non-existing path in your realm, and you should see your custom error message.
Next step
Create a proper 404 page and redirect any requests for missing paths to it. Hint:
you want to use zimki.redirect to do this.
See also
Parent
CookBook
|