How to redirect every uri calls to one controller, except some static ones?

Posted by Oden on Stack Overflow See other posts from Stack Overflow or by Oden
Published on 2010-05-14T16:18:39Z Indexed on 2010/05/16 22:10 UTC
Read the original article Hit count: 310

Filed under:
|
|
|
|

Hey, Im using codeigniter and want to make my portal a bit more seo friendly. I have a controller (articles) witch handles every article, on my portal. The URL looks like this:

example.com/articles/category-sub-category/article-name

I'm using mod rewrite module to hide my index.php, and codeigniter routing to hide the controller action that handles every call.

I want to hide articles too, but if i hide it, every call goes to the articles controller, and thats not what i want, because i want my url look like this:

example.com/category-sub-category/article-name

Ive tried it with regexp routing rules in the routes.php but i found no way to make it right.

© Stack Overflow or respective owner

Related posts about codeigniter

Related posts about ci