Redirect Custom Error Page Using .htaccess


Prev Tutorial Next Tutorial

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

Prev Tutorial Next Tutorial

Google Advertisements
Download Projects

Google Adsense Advertisements

Buy 3 Year Old Domain, Tutorialday.com, SeosmoTools.com @$200

Buy This Ad Space @$50 per Month, Ad Size 300X250 Contact on: hitesh.xc@gmail.com WhatsApp no. 8882538826

Yahoo Advertisements