Thursday, May 29, 2014

404 page not found setting in codeigniter

If you have to set 404 page not found in your application and you are using php codeigniter  framework
you need to open application/config/routes.php  file and set the following setting

$route['404_override'] = 'not_found/index/';

In above statement not_found is the controller and index is the function in that controller.

-------------------------------------------------------------------

If you are not using any type of php framework or codeigniter , then you must have to create,configured and setup the page not found setting manually.

Create a file page_not_found.php for page not found option and save it.

Now, you have to put some setting lines into your .htaccess file
If this file is already present, then you have to modified it  and append following lines and save it.


RewriteEngine on
ErrorDocument 404 http://localhost/webapp/page_not_found.php


No comments: