CodeIgniter Forums
CI links question - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: CI links question (/thread-28654.html)

CI links question - El Forum - 03-17-2010


It is possible to make links with CI like wordpress(

I don't like!

Could somebody help me? An example or something would be great!

Thank you

CI links question - El Forum - 03-17-2010

Look into routing in the user guide. It lets you re-route a url to a controller/function/parameters. Once you've come up with a url scheme, it's fairly easy to construct routes to use the controllers/methods you want.

So if you wanted a scheme such as, then your route could look like this.

$route['blog/(:any)/(:any)'] = "blog/get_post/$1/$2";

Where blog (at the right side of equals) would be the controller, get_post would be the method in the controller, and $1 and $2 would be parameters to the method in the controller.

You can use regex instead of simple strings to do more complex routing techniques, too.

CI links question - El Forum - 03-17-2010

Thanks a lot for your reply, i will try right now.