Redirect Custom Error Page Using .htaccess
Advertisements
How to Redirect Custom Error Page Using .htaccess
Redirect all error page on custom error page is helpful to improve your website search engine ranking. Creating custom error pages is very useful, it allows you to show website visitors a friendly error message.
.htaccess file for Custom Error Pages
ErrorDocument 404 /filenotfound.html
.htaccess file for Custom Error Pages
//Custom 400 errors ErrorDocument 400 /error_pages/error400.html //Custom 401 errors ErrorDocument 401 /error_pages/error401.html //Custom 403 errors ErrorDocument 403 /error_pages/error403.html //Custom 404 errors ErrorDocument 404 /error_pages/error404.html //Custom 500 errors ErrorDocument 500 /error_pages/error500.html
If you wanted to redirect users for another error, such as 500, Internal Server Error, you would do it like this (and so on)
.htaccess file for Custom Error Pages
ErrorDocument 500 /filenotfound.html
Google Advertisment