routes.php question

I'm new to CI and have just finished up the Static example in the User Manual Tutorial.


brings down the default home.php page, as expected, and entering

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

to bring down the default home page.

No surprises yet.

But now if set $route['default_controller'] = 'pags/view/$1';

and I enter

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

and brings down the about page.

Can someone explain what's going on here? Why doesn't

bring down the about page after I set $route['default_controller'] = 'pags/view/$1';


The default controller route is only for when the homepage is viewed, aka or

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.