How to create custom 404 error page using .htaccess | 2my4edge

03 July 2013

How to create custom 404 error page using .htaccess

Most of the web pages show the error like 404 page error.  So here we have solution to make the custom web page for that 404 page error by using .HTACCESS.  This 404 error make your website uneasy. So here we are using the HTACCESS file for that. As we know already we discussed here about how to make www to non-www and non-www to www using HTACCESS file. Now let see the one more thing about this HTACCESS custom 404 page error.
custom-404-page-error

DOWNLOAD                LIVE DEMO

And the coding is for that custom 404 page error is

ErrorDocument 404 /404.html

Just use the above code for that. ErrorDocument 404 / filename.html or .php 

Sample file allocation location image

htaccess location allocation image

and see my custom 404 error page, here I done one thing using meta tag that is


<meta http-equiv="refresh" content="10; url=http://www.2my4edge.com/" />

We already discussed about meta tag for refresh in last change back ground image for each refresh. So here we are doing one more extra thing here.

That is <meta http-equiv=”refresh” content=”5; url=http://www.yoursitename.com/” />

That will redirect you after 5 seconds for your web page what you given the url.




RELATED POSTS:





change back ground image for each refresh

1 comment:

^