0

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
  • Your categorie method takes two arguments? Commented Dec 4, 2013 at 14:29

1 Answer 1

1

It should be

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

Sign up to request clarification or add additional context in comments.

4 Comments

You forgot (:num)/(:any)
Thanks, So if i wanted to remove categorie also i should do $route['(:num)/(:any)'] = "site/categorie/$1/$2"; ?
Yeah, give it a shot.
It works, Great! Still i have one more question is there a possibilty to overwrite the url after clicking <?php echo site_url('categorie/'.$row->cat_id .'/'.$row->naam); ?> because i want the function to be executed when a button gets clicked but i don't want to show it in the URL, and it seems that i can't get rid of that with a route after clickin the site_url

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.