This is always a best practices to create your own error page rather showing the host default page. You can use your own custom error pages for any know error like 404 - page not found, 500 - Internal Server Error etc.
It can be simply done by adding the following code to your .htaccess file.
1. 404 - page not found
2. 500 - Internal Server Error
3. 403 - Forbidden
4. 400 - Bad request
5. 401 - Authorization Required
You can also redirect all error to single page. like
It can be simply done by adding the following code to your .htaccess file.
ErrorDocument errornumber /file.html
RewriteEngine On ErrorDocument 404 /404.html
RewriteEngine On ErrorDocument 500 /500.html
RewriteEngine On ErrorDocument 403 /403.html
RewriteEngine On ErrorDocument 400 /400.html
RewriteEngine On ErrorDocument 401 /401.html
RewriteEngine On ErrorDocument 404 /404.html ErrorDocument 500 /404.html ErrorDocument 403 /404.html ErrorDocument 400 /404.html ErrorDocument 401 /401.html
No comments:
Post a Comment