Trailing slash in tutorial |
[eluser]pointmanx[/eluser]
[quote author="DarkManX" date="1343475499"]index.php/news/ would match this one: Code: $route[‘news/(:any)’] = ‘news/view/$1’; index.php/news this one: Code: $route[‘news’] = ‘news’; try to put out the uri you have been led to.[/quote] @DarkManX: you probably mean output...i.e. something like an echo? Here's what I did (temporarily) to check the portion of the uri that was getting sent as the slug: (inside /appplication/controllers/news.php) Code: public function view($slug) It turned out that when following the tutorial routing: Code: $route[‘news/create’] = ‘news/create’; Code: $route[‘news/create’] = ‘news/create’; This means that the only way to get to the item identified by the slug segment is to do so directly off of the view function segment. Perhaps this was not what the author intended, but there's no hint in the tutorial to say where Code: $1 Code: (:any) Hope this helps to shed some light on the issue. PS-- @InsiteFX (or whoever is the author of the tutorial): Please review this and update your tutorial as necessary, for the sake of other new users who, in trying just to get the basics, run across this issue and potentially get frustrated before they have enough understanding of routing to troubleshoot what is going on. |
Messages In This Thread |
Trailing slash in tutorial - by El Forum - 07-26-2012, 12:26 AM
Trailing slash in tutorial - by El Forum - 07-27-2012, 02:38 AM
Trailing slash in tutorial - by El Forum - 07-27-2012, 10:39 AM
Trailing slash in tutorial - by El Forum - 07-28-2012, 01:00 AM
Trailing slash in tutorial - by El Forum - 07-28-2012, 04:38 AM
Trailing slash in tutorial - by El Forum - 07-28-2012, 06:28 AM
Trailing slash in tutorial - by El Forum - 07-28-2012, 01:47 PM
Trailing slash in tutorial - by El Forum - 08-24-2012, 05:32 PM
Trailing slash in tutorial - by El Forum - 08-25-2012, 05:36 PM
Trailing slash in tutorial - by El Forum - 03-09-2013, 09:47 PM
|