[eluser]#1313[/eluser]
Hello everybody, another newbie coming up!
My site has a cars catalogue, and i want to produce following URIs for my cars:
Code:
http://site.com/cars/lamborgini
and for specific models:
Code:
http://site.com/cars/lamborgini/murcielago
I have following functions in my Cars controller,
car_maker() and
car_model(), and a simple rule in routes.php:
Code:
$route['cars/:any'] = "cars/car_maker";
which succesfully sends control to
car_maker function. Great, i can read about Lamborginis.
But now i want to read a page about Lamborgini Murcielado. I want to add a routing rule to launch
car_model function, but i don't know how to write a rule with multiple wildcard characters properly. I tried
Code:
$route['cars/:any/:any'] = "cars/car_maker/car_model";
but this isn't working. How do i do this?