keskiviikko 22. tammikuuta 2014

How To Create A Custom 404 error page

If you have LAMP installed and your website is in /var/www or public_html folder check if you already have .htaccess file by typing command

ls -a to see hidden files. If the htaccess file is not there create it by typing
nano .htaccess

ErrorDocument 404
where you can also use local path /404page.html and also rename the 404page if you want.

Then give access to your htaccess file with chmod 644 .htaccess

Thats it. Now navigate to and see your 404 error page.

Explained here more specifically: