routes.php question |
[eluser]stevea[/eluser]
I'm new to CI and have just finished up the Static example in the User Manual Tutorial. Entering www.mysite.com/CI_Tutorial/ci/index.php/pags/view brings down the default home.php page, as expected, and entering www.mysite.com/CI_Tutorial/ci/index.php/pags/view/about brings down the about page, as expected. (Note that I've changed the controller name from pages to pags.) Then I set $route['default_controller'] = 'pags/view'; and that let me enter just www.mysite.com/CI_Tutorial/ci/index.php to bring down the default home page. No surprises yet. But now if set $route['default_controller'] = 'pags/view/$1'; and I enter www.mysite.com/CI_Tutorial/ci/index.php/about I get a 404. This surprises me, because if I use the other route example the tutorial gives: $route['(:any)'] = 'pags/view/$1'; that does let me enter www.mysite.com/CI_Tutorial/ci/index.php/about and brings down the about page. Can someone explain what's going on here? Why doesn't www.mysite.com/CI_Tutorial/ci/index.php/about bring down the about page after I set $route['default_controller'] = 'pags/view/$1'; Thanks, Steve |
Messages In This Thread |
routes.php question - by El Forum - 01-09-2013, 08:47 PM
routes.php question - by El Forum - 01-09-2013, 09:59 PM
|