Question about monolithic controllers and URL formatting

Hello All,

I'm new here, so my apologies in advance if this is a dumb question.

I would like to use CI on some small web sites (5-10 "pages").

It would work into my workflow very well if I could use a single controller for the majority of the pages. But I do not want to sacrifice simple URL's to do this.

Is there a way that a singles controller could handle URL's like:

while another controller takes care of forms processing

What would be the most graceful way to do this ?

Much Thanks,

[eluser]Ben Edmunds[/eluser]
For a basic site that would be fine.

Look up routes in the userguide. That will give you pretty urls with the functionality you want.

Thanks Ben,

I've tried doing this using a wildcard route, but it doesn't seem to work. The route I tried looked like this:

$route[':any'] = "master/$1";

I would like to avoid having to manually enter all of the function names a second time (1st in the controller, and then here) as it seems like it would be an easy place for things to get out of sync.

Thank you for your help, I am liking CI and the community here very much!


Woops, my bad, I should have been using:

$route[’(:any)’] = “master/$1”;

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.