Pow server error document 404

From PlainOldWebserver

Jump to: navigation, search

pow_server.error_document_404

The error_document_404 allows a custom 404 page to be displayed. This page can be an SJS page. Configure this in your pow/htdocs/system/startup.sjs file.

startup.sjs:

  <?sjs
     pow_server.error_document_404="/pow/htdocs/404.sjs";
  ?>


404.sjs:

  <html>
  Sorry.
  <?sjs
     document.writeln(pow_request.req_file+" was not found.<br/>");
     document.writeln("Please check the address and try again.");
  ?>
  </html>

Result:

  Sorry. /pow/htdocs/asdf.sjs was not found.
  Please check the address and try again.
Personal tools
Navigation