Custom error pages for 404, 500 status codes
This can be implemented either through Mongoose web server error handling mechanism, or through the OnLoadError() callback in CEF.
For now I see only use for it for 404 pages. But there might be other cases, like directory listing denial (500?). PHP errors can be handled via set_error_handler and set_exception_handler functions. Though we might support all 5xx status codes here as well.
Support for other error codes should be straightforward to add, see https://github.com/cztomczak/phpdesktop/blob/190fbae92d0586f6e10f4b87a21aa5e1c5943dc8/phpdesktop-chrome/web_server.cpp#L52
See also related issues that are about friendly error messages:
- Issue #131
- Issue #127
Original issue reported on code.google.com by [email protected] on 8 May 2014 at 11:28
Hi, If there was an option (a settings.json parameter) to set a single error page for all possible errors then too it was great. The need to for separate error pages for 404,500 etc might be minimum, but the certainly there is good need and use for a common/general custom error page. Thanks and regards, Sreenadh
New option ["web_server"]["404_handler"] was added to settings.json that allows for handling 404 errors, which in turn allows pretty url rewrites. See for more details: https://code.google.com/p/phpdesktop/issues/detail?id=81#c10
Original comment by [email protected] on 27 Oct 2014 at 12:07