Reputation: 21
I have set routes in routes.php
for my default page but it shows a 404 error when opening localhost/mywebsite
$route['default_controller'] = "page";
$route['404_override'] = 'page';
I have set the above code in routes.php
which gives a 404 error. The page controller has been created.
Upvotes: 0
Views: 6222
Reputation: 9071
You configured default controller & 404_override URL with the same value.
When ever you access to your web site automatically open page controller index function
ie ur_project_url/page/index
OR
ur_project_url/index.php/page/index
when ever you can get the 404 error also open same page controller index function
ie ur_project_url/page/index
OR
ur_project_url/index.php/page/index
please check your controllers and function and routes ,htacess
file
please remove your url index.php
using htacess
in config folder $config['log_threshold'] = 0;
to $config['log_threshold'] = 1;
check log files
Upvotes: 0
Reputation: 41
You need to make sure following things:
Upvotes: 1