![]() |
Default controller is always loaded - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Default controller is always loaded (/showthread.php?tid=41063) |
Default controller is always loaded - El Forum - 04-26-2011 [eluser]obay[/eluser] Hi, I am trying to migrate my CI 1.7.2 application into 2.0.2. I have gotten to the point where my default controller and page are loaded correct. Yey! However, the default controller is all that's ever loaded. Example: myapp/ -> loads default controller (one) myapp/one -> loads default controller (one) myapp/two -> loads default controller (one) myapp/three -> loads default controller (one) My .htaccess is: Code: <IfModule mod_rewrite.c> My config.php is: Code: $config['base_url'] = 'http://localhost/myapp/'; By the way, I've tried all other possible values for Code: URI PROTOCOL Finally, my routes.php is: Code: $route['default_controller'] = "one"; I also tried changing default_controller to "two" and it correctly loads the "two" controller. But when the default_controller is "one" and I type in "myapp/two" or "myapp/three" in the address bar, it still loads "one". What am I missing? ![]() Default controller is always loaded - El Forum - 04-27-2011 [eluser]toopay[/eluser] Change this line Code: RewriteRule (.*) index.php/$1 [L] Code: RewriteRule ^(.*) index.php?/$1 [L] Default controller is always loaded - El Forum - 04-27-2011 [eluser]obay[/eluser] Wow that solved it! Thanks! |