CodeIgniter Forums
Url rooting problem - 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: Url rooting problem (/showthread.php?tid=14760)



Url rooting problem - El Forum - 01-14-2009

[eluser]Dimitar Velkov[/eluser]
I have problem with the rooting on mu multilingual site/blog. For the language I'm rooting with this
Code:
$route['(..)$'] = "front";
$route['(..)/(.+)$'] = '$2';

this go's to language/controller

and now I want to root some thing like this
Code:
1. $route['(..|...)/(:any)'] = "front/cat/$2";
2. $route['(..|...)/(:any)/(:any)/(:any)'] = "front/post/$4";

1. is for domain.com/en/some_value to go's to domain.com/front/cat/some_value and the
2. is for domain.com/en/some_value/other_value to go's to domain.com/front/post/other_value

the problem is that I always get root to the cat function in my controller named front.

Help please.

Thx