When requesting an invalid page web2py generates a default 400 error page.
This can be overwritten. There are at least three ways:
1) If you use mod_proxy you can set in the apache config file
Then you can filter error messages using mod_include SSI and render them as you like.
2) You create a routes.py file in web2py/ as discussed in a previous post. You need to explicitly list all the allowed routes and add a catch all invalid routes at the end, for example:
will render all invalid urls as '/examples/default/index'
3) On error web2py also adds a header web2py_error to the http response. You can easily create wsgi app that wraps web2py wsgibase and filters response accodingly.