[eluser]Sven Delle[/eluser]
I have a Site Controller which I access like this:
Code:
www.domain.com/site/index/page_slug
As I use the page_slug to look up pages in the database. SEO friendly, right?
Now, I don't find the site/index part of the url very SEO friendly. How do I get rid of it (or at least the /index part of it)?
I've read all about routes in CodeIgniter, and to put it short: I don't get it!
How do I re-route my pages to the Site Controller and have the index function (the default) called passing the page_slug, as in:
Code:
www.domain.com/page_slug
This should of course only be for the Site Controller, as I have other controllers that need not be re-routed.
I can't seem to put the routes documentation to any use in my case. If I use site/(:all), well, ALL pages get re-routed in a loop of course.
Any thorough examples of how to do this (with thorough explanation)?