Welcome Guest, Not a member yet? Register   Sign In
[SOLVED] routing woes
#1

[eluser]MV[/eluser]
I have been stuck with routing for days:

How can i do this:

http://www.site.com/en/section1/...
http://www.site.com/es/....

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:

http://www.site.com/section1

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.

Thanks
#2

[eluser]Cro_Crx[/eluser]
This might help http://ellislab.com/forums/viewthread/101790/P0/

Something like this would probably work:

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

[eluser]MV[/eluser]
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




Theme © iAndrew 2016 - Forum software by © MyBB