routes problem ? (thx for reading) |
[eluser]Michael Ekoka[/eluser]
I'll try to give a crack to your problem. I'm writing this from the top of my head here so this may or may not work at the first trial. Two problems that i see with your regex: 1-) the regex syntax is wrong or at least it will not behave as expected. I'll try to explain what your regex is doing at the moment: what you have: Code: $route['([cs|sk|pl])/(.*)'] = "$2/$1"; Code: $route['(cs|sk|pl)/(.*)'] = "$2/$1"; 2-) Second problem: your language code is not made optional, if you don't include it in the url, your routing may give some unexpected results. what you actually want: Code: $route['(?:(cs|sk|pl)/)?(.*)'] = "$2/$1"; I have posted something similar about internationalization via uri and routing, if you're interested go here. |
Messages In This Thread |
routes problem ? (thx for reading) - by El Forum - 01-09-2008, 04:18 PM
routes problem ? (thx for reading) - by El Forum - 01-09-2008, 04:25 PM
routes problem ? (thx for reading) - by El Forum - 01-09-2008, 04:47 PM
routes problem ? (thx for reading) - by El Forum - 01-09-2008, 04:55 PM
routes problem ? (thx for reading) - by El Forum - 01-09-2008, 06:00 PM
routes problem ? (thx for reading) - by El Forum - 01-09-2008, 06:26 PM
routes problem ? (thx for reading) - by El Forum - 01-09-2008, 06:44 PM
routes problem ? (thx for reading) - by El Forum - 01-10-2008, 12:57 AM
|