PHP have one great file called .htaccess file. With this file you can do lots of stuff which you might have not imagine.
In this post I will show you the trick to set up the 404 handler using .htaccess file.
404 handle is just like a fallback page, which should be display when user visited the page which is not exists.
For setting up the 404 Handler, you just need to perform two simple steps.
First is to create a file which handles the 404 error and place/upload this file to the root of your server.
Now place below code in your htaccess file.
So from above code you can see that 404.php will be served when 404 Not Found occures.
So Easy :)
Avinash Zala is leading various projects which deals with the various technology involved with the web. A combination of perfect technical and management skills. Avinash would like to chat with you and convert your imagination into the working system. You can get in touch with him on Facebook and Twitter.
View all posts by: Avinash