Kho Chung Ning
Kho Chung Ning

Reputation: 11

Changes on default controller leads to 404 Page Not Found

I changed default controller to point to my own controller but it will leads to 404 Page Not Found. I change back the default controller and it works just fine.

I tried on changing the .htaccess

$route['default_controller'] = 'public_c/home';
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;

$route['home'] = 'public_c/home';

i expect when i removed the index.php in my url, it will point to the public_c/home

Upvotes: 0

Views: 45

Answers (1)

Sherif Salah
Sherif Salah

Reputation: 2143

You cannot put you default controller inside a directory under controllers .. if you must you have two options .. first redirection which you can create a default controller directly under controllers directory and then redirect to your public_c/home .. and secondly (not preferable at all unless you extend the core) modifying systems's router.

Upvotes: 1

Related Questions