Redirect Custom Error Page Using .htaccess

Advertisements

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 Advertisment

Buy This Ad Space @$20 per Month, Ad Size 600X200 Contact on: hitesh.xc@gmail.com or 9999595223

Magenet is best Adsense Alternative here we earn $2 for single link, Here we get links ads. Magenet

For Projects 9999595223

Google Advertisements


Buy Websites 9999595223

Buy College Projects with Documentation Contact on whatsapp 9999595223. Contact on: hitesh.xc@gmail.com or 9999595223 Try this Keyword C++ Programs

Advertisements