简体   繁体   中英

Codeigniter ignoring 'default_controller' route

I've got a Codeigniter 3 site where all my routes work except my home page route, which is like so:

<?php
$route['default_controller'] = "front/homepage";
?>

If I create a new route as below I can access it as "/home" but nothing works for index. I get an error in my log as 404 Page Not Found: /index , in my config i have index set to blank.

<?php
$route['home'] = "front/homepage";
?>

Any ideas?

Thanks

This is no-longer supported in Codeigniter since V2 due to it being a bug in the routing logic.

http://www.codeigniter.com/userguide3/installation/upgrade_300.html#directories-and-default-controller-404-override

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM