Thursday 29 November 2012

Creating 404 page in PHP (.htaccess)

404 is a status shown by your browser when the requested page is not found by your server. In PHP you can design a custom 404 page using .htaccess functionality. Here is a sample code for this:

.htaccess
RewriteEngine on
ErrorDocument 404 [path]404.php

Place this code in your projects root. 404.php can be a custom page designed by you. Try it out.

Thank You!

No comments:

Post a Comment