Welcome Guest, Not a member yet? Register   Sign In
Tutorial tweak - Static Pages (routing)
#1

[eluser]Unknown[/eluser]
When following the tutorial strictly (http://ellislab.com/codeigniter/user-gui...pages.html), the routing section isn't correct.

According to the tutorial, this should route "index.php/about" to "index.php/pages/view/about":
Code:
$route['default_controller'] = 'pages/view';
$route['(:any)'] = 'pages/view/$1';

I fixed it with this (is this the best way of doing this?):
Code:
$route['default_controller'] = "pages/view";
$route['about'] = "pages/view/about";
$route['(:any)'] = 'pages/views/$1';

(Note, when looking up other topics on the tutorial I found them in this section, I'm not sure if it's the correct one, apologies if it isn't.)




Theme © iAndrew 2016 - Forum software by © MyBB