Welcome Guest, Not a member yet? Register   Sign In
CI links question
#2

[eluser]nelson.wells[/eluser]
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 http://www.example.com/blog/april/cross-site-scripting, 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.


Messages In This Thread
CI links question - by El Forum - 03-17-2010, 04:13 PM
CI links question - by El Forum - 03-17-2010, 04:29 PM
CI links question - by El Forum - 03-17-2010, 04:38 PM



Theme © iAndrew 2016 - Forum software by © MyBB