Welcome Guest, Not a member yet? Register   Sign In
Some help with SEF URLs
#1

[eluser]Unknown[/eluser]
Hi, I'm being developing with codeigniter for a short time, but I think is the most complete framework using mvc arch.

So, I allready developed my website but there is something that I can't understand at all, is about making my URLs SEF (search engine friendly).

Explaination: I got categories and items in my database these items have relations with categories in this way -> Table[Categories] - Table [items] - Table[Relation-categories-items]

I want to structure muy web in this way -> myweb.com/category/item
catching the SEF field on DB of each category and each item to build the url:

for example:
myweb.com/news/obama-says-yes-we-can
myweb.com/articles/european-traveler-stastisc
myweb.com/review/nokia-n95-celphone

I gues it's possible to make it with codeigniter.

thanks
#2

[eluser]Thorpe Obazee[/eluser]
it is possible. your should query your database using the url title eg.obama-says-yes-we-can and news
#3

[eluser]Unknown[/eluser]
I understand, so i need to build the links with my SEF field, then catch with a controler as a param, then make query my DB looking for this field.

But query's gonna to be more slower loking for a long string than a sort id.
Maybe I'm wrong, im not sure at all
#4

[eluser]Thorpe Obazee[/eluser]
you probably also need to do routing to get that type of URL.

EDIT: the news categories etc are hard coded? I thought they were dynamic?




Theme © iAndrew 2016 - Forum software by © MyBB