CodeIgniter Forums
Routing multilingual pages - 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 multilingual pages (/showthread.php?tid=58509)



Routing multilingual pages - El Forum - 06-18-2013

[eluser]thekrow[/eluser]
I haven't been able to find a similar situation in previous threads. I'm having trouble setting up my routes correctly. Basically what I need is, regardless of the language key entered I want my uri to be routed to what's on the right hand side. If I just do this it works fine:

Code:
$route['en/quote/quote-response'] = 'quote/process_form/quote-response';

I need something like this but it doesn't work:
Code:
$route['(en|cz|sp)/quote/quote-response'] = 'quote/process_form/quote-response';

I'm aware this is something simple, the answer might just be a missing symbol at the end of at the beginning? truth is I'm not so good at regex, I've tried different things to no avail :/

Thanks for your help.


Routing multilingual pages - El Forum - 06-19-2013

[eluser]Pert[/eluser]
This should work

Code:
$route['(:any)/quote/quote-response'] = 'quote/process_form/quote-response';



Routing multilingual pages - El Forum - 06-19-2013

[eluser]thekrow[/eluser]
I actually fixed the issue! The route was OK but the problem was that I had set the route in question at the bottom of my file. I totally overlooked the routes that were set before which of course, were messing with the one at the bottom.

Thanks for your help anyway.


Routing multilingual pages - El Forum - 06-19-2013

[eluser]Pert[/eluser]
Happy days, it usually is the tiniest thing indeed Smile