[eluser]chitoso[/eluser]
Hi guys, this is my first time here. I've been learning CI for a quick project. It's been a couple of days now and I think it was a great choice so far.
Anyway, I have a specific doubt that couldn't solve in this few days.
In my routes.php:
Code:
$route['admin/pages/edit/(:num)'] = 'admin/admin/edit_page/$1';
On my Admin Controller I have the function:
Code:
function edit_page($page_id) {
...
}
And in some point in edit_page I I'm doing some redirects like:
redirect('admin/pages/edit/' . $page_id)
But, I'd feel it much more natural to do this:
redirect('admin/admin/edit_page/', $page_id). This way, URLs wouldn't have to be so coupled in the code.
Is the first usage the way we're supposed to do this or am I missing something?
Thanks!