How do I set up error pages for my PHP site?

You can use an .htaccess file to create custom error pages for your site's defaulted to PHP.

ErrorDocument "code" "location of error document"

For example, with a 404 error:

ErrorDocument 404 /404.html

You can use this directive to create error pages for other error codes as well. You will need to specify the path to the error page relative to the location of the .htaccess file.

© 2015 Rackspace US, Inc.

Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License

See license specifics and DISCLAIMER