I want to know whether it is possible to write pretty URLs in Code igniter or not?
I mean i have a code igniter project in which i am displaying data from uri segments like this:
http://myproj.local/category/subcategory/64/239
where 64 is the id of my category (e.g Garden Products )and 239 is my subcategory id (e.g Brushes).
Is there anyway I could write URLs like this in code igniter:
For categories:
http://myproj.local/Garden Products/
http://myproj.local/Household Range/
and for subcategories:
http://myproj.local/Garden Products/Brushes/
http://myproj.local/Household Range/Buckets/
Just like wordpress or other CMS.
IN SHORT,I WANT MY CODE IGNITER MVC framework TO DISPLAY URLs /Pages like these:
http://myproj.local/Garden Products/Brushes/
http://myproj.local/Household Range/Buckets/
Is this the kind of thing that can be achieved in the Code igniter or not??
IF YES, then how can I do this and how can i write this in code igniter ??What approach shall i use to achieve this ? I would appreciate if you could help me in this regard.Thanks
I have answered a simular question on this before.
Check this out and see if it helps.
Other options include database driven routing, take a look at this link.
Also there is an article/example on reverse routing here that may prove helpful.