CodeIgniter Forums
routes with GET parameters - 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: routes with GET parameters (/showthread.php?tid=56963)



routes with GET parameters - El Forum - 02-03-2013

[eluser]Kunzilla[/eluser]
Hi,

i define that routes:

$route['(en)'] = "start/start/index/?lang=english";
$route['(en)/(register)'] = "$2/$2/index/?lang=english";

But it doesnt work. Whats wrong and how can i fix that?
It must have this structur without any get-parameter in the real url.

AND: i use the hmvc extension / plugin / addon

please help!




routes with GET parameters - El Forum - 02-04-2013

[eluser]p5systems[/eluser]
Hi Kunzilla,

Try This !!!!
Code:
$route[’en’] = “index?lang=english”;
$route[’en/register’] = “index?lang=english”;
And in Config.php
Code:
$config['enable_query_strings'] = TRUE;

Thanks


routes with GET parameters - El Forum - 02-04-2013

[eluser]Kunzilla[/eluser]
mmh, looks like my other solution i tried.

How to set the controller name in the value?

Code:
$route[’en/register’] = “index?controller=register&lang=english”;


???