Showing posts with label found. Show all posts
Showing posts with label found. Show all posts

Tuesday, 9 May 2017

Creating a custom 404 Not Found page in Apache Server

Creating a custom 404 Not Found page in Apache Server


DEMO
You might have seen a 404 page on different sites such as Google,Yahoo etc... You can make this on your website too if you are using Apache Server. The default 404 page will be like this :
Its just simple plain HTML 404 page and its ugly. To Change the default 404 page Do as below.
Go to your sites folder.
Create a file named .htaccess (just .htaccess no name only file extension).
Open the file and add the line.
ErrorDocument 404 /pathtofile
Replace /pathtofile with your 404 page file name which should be situated in the same folder as the file .htaccess . The custom 404 file can be in PHP or HTML.
You can also add HTML to it like this:
ErrorDocument 404 <html><head></head><body><h1>404 Not Found-Subins Blog</h1></body></html>
You dont have to reload Apache Server ! Its finished. Test it out. Heres an example of a custom 404 page.

{ Read More }