02-16-2012, 01:07 PM
[eluser]jamiejonks[/eluser]
If you have a page at index.php/news with links on it to news/slugname, as you will if you follow the news tutorial, you end up with links in the form of index.php/news/news/slugname, i.e. with two 'news' parts. Using the site_url() function or not typing 'news' into the href solves this, so the route given in the tutorial ($route['news/(:any)'] = 'news/view/$1'
works. I can't see how this modification is me 'not linking to the proper place', but rather that the tutorial contains an error.
Thanks for clarifying what the slug is, it's a shame the tutorial doesn't tell you not to put spaces in when manually creating a few records. Having said that, I'm sure at some point it would still be useful to know how to handle spaces (and anything 'unusual') in URLs. I haven't found a definitive 'best practice' answer to this.
If you have a page at index.php/news with links on it to news/slugname, as you will if you follow the news tutorial, you end up with links in the form of index.php/news/news/slugname, i.e. with two 'news' parts. Using the site_url() function or not typing 'news' into the href solves this, so the route given in the tutorial ($route['news/(:any)'] = 'news/view/$1'

Thanks for clarifying what the slug is, it's a shame the tutorial doesn't tell you not to put spaces in when manually creating a few records. Having said that, I'm sure at some point it would still be useful to know how to handle spaces (and anything 'unusual') in URLs. I haven't found a definitive 'best practice' answer to this.