Online Forum To Support Coders With Technical Assistance - Read Write Execute

set custom 404 page via htaccess

Ankit Agrawal
Ankit Agrawal
Published on July 26, 2014 · 1 min read

you can set a custom 404 error page via a .htaccess file very easily. This will allow you to set a good looking error page insted of default boring page.

(1)create a page at your root directory name 404.php and design it.
(2)create a .htaccess file at your root directory or if you have already then open it
(2)add following code in this file

ErrorDocument 404 404.php

Was this article helpful?
Ankit Agrawal

Ankit Agrawal

Author & Senior Engineer at CodeExecute

Writing practical engineering guides, debugging real-world bottlenecks, and creating free tools for developer productivity.

← Previous Article what is jQuery Next Article → change template in dolphin-boonex