08-08-2012, 04:31 PM
[eluser]fjamal[/eluser]
I have a custom '404 Not Found' page handled by Custom404 controller.
Unfortunately, custom404 can be accessed directly via URL as http://www.example.com/ci_proj/custom404
I want to prevent custom404 to be accessed directly via URL, so i decided to put it under a folder and set .htaccess for the folder.
I put custom404 into a folder named 'my_error_page' and then fixed to
NOTE: custom404.php resides under applications/controllers along with other controllers such as home, etc.
When i type a wrong controller name for the sake of testing, i don't get the 404 page anymore. I get this error:
Any idea how to prevent user's from accessing Custom404 controller? I do not want to do it via _remap.
Thanks
I have a custom '404 Not Found' page handled by Custom404 controller.
Unfortunately, custom404 can be accessed directly via URL as http://www.example.com/ci_proj/custom404
I want to prevent custom404 to be accessed directly via URL, so i decided to put it under a folder and set .htaccess for the folder.
I put custom404 into a folder named 'my_error_page' and then fixed
Code:
$route['404_override'] = 'custom404';
Code:
$route['404_override'] = 'my_error_page/custom404';
NOTE: custom404.php resides under applications/controllers along with other controllers such as home, etc.
When i type a wrong controller name for the sake of testing, i don't get the 404 page anymore. I get this error:
Quote:Unable to load your default controller. Please make sure the controller specified in your Routes.php file is valid.
Any idea how to prevent user's from accessing Custom404 controller? I do not want to do it via _remap.
Thanks