Tutorial Error Page to Handle All Errors

This is a way to make a single error page for all errors, which is easier to update and maintain. 1) Point all error pages at one location i...

This is a way to make a single error page for all errors, which is easier to update and maintain.
1) Point all error pages at one location in your .htaccess file
ErrorDocument 400 /error.php
ErrorDocument 401 /error.php
ErrorDocument 403 /error.php
ErrorDocument 404 /error.php
ErrorDocument 500 /error.php
etc.
2) PHP for error.php page in root
$status = $_SERVER['REDIRECT_STATUS'];
$codes =

Hot in Week

Popular

Archive

item