Create a custom error page

You can create custom error pages and redirect to these pages by adding the below given codes in the htaccess pages

ErrorDocument 404 /404.php
ErrorDocument 500 /500.php
ErrorDocument 401 /401.php
ErrorDocument 403 /403.php