CodeIgniter Forums
[SOLVED] routing woes - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived General Discussion (
+--- Thread: [SOLVED] routing woes (/thread-26504.html)

[SOLVED] routing woes - El Forum - 01-15-2010

I have been stuck with routing for days:

How can i do this:

I want to check on routes to see if that first language segment exists. If it does, we get on with the work, otherwise it loads a particular controller.

Also, i want to avoid this from working:

All my urls have to have the first language segment - site sections will react to the different language/first segment.

Been fooling around with all types of routes but to no avail. :-P

Any links to sites with routing examples are highly appreciated, since the manual is very small on this.


[SOLVED] routing woes - El Forum - 01-15-2010

This might help

Something like this would probably work:

$route['(en|es)/(:any)'] = "$2/$1";

[SOLVED] routing woes - El Forum - 01-15-2010

Thank you, Cro_Crx. Already reading the link and trying the suggestion..and trying to understand it also. Somehow i cant get my head wrapped around the routing business. Must be getting old. :-P