Routing my URL in CodeIgniter

76 views Asked by At

I tried remapping my URL, but without any success. Here is my URL:

localhost:8888/nordia/site/categorie/1/transportwagon

What I'm trying to do is remove the "site" part from URL and keep it like:

localhost:8888/nordia/categorie/1/transportwagon

I tried mapping it like:

 $route['site/categorie'] = "categorie";

But it is not working. What am I doing wrong here?

1

There are 1 answers

4
Suthan Bala On BEST ANSWER

It should be

$route['categorie/(:num)/(:any)'] = "site/categorie/$1/$2";