![]() |
Routing improvement/recommendation on my current schema - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Routing improvement/recommendation on my current schema (/showthread.php?tid=2750) |
Routing improvement/recommendation on my current schema - El Forum - 08-22-2007 [eluser]stevefink[/eluser] Greetings! I'm looking to improve my current routing/controller/method schema. I'm going to use real names of my current schema here in hopes of someone suggesting something more clever. Essentially, my site is broken down into a front-end website for public surfers and a console end of the site for backend inventory management, etc. Currently the user would login to http://site/console (console being a controller and having it's index() {} verify a user with a login form. ) If the user successfully validates, I want the URL schema to remain under console. So what I did was redirect the user to http://site/console/addvehicle/carinfo (my routing engine has this: $route['console/addvehicle/carinfo'] = 'addvehicle/carinfo'; What kind of sucks, is for my addvehicle photos section (which is a form which you get passed onto if carinfo() {} validates) is another controller, photoupload.php which I have the following routes for: Code: $route['console/addvehicle/photos'] = 'photoupload'; It would be cool if I can do something more along the lines of: http://site/console/vehicle/add/carinfo http://site/console/vehicle/add/photos http://site/console/vehicle/add/carfax I'm just not sure how I'd properly revamp that into controller/methods and routing due to lack of experience. If anyone would be kind enough to help me out, that'd be great! Thanks all. - sf |