[eluser]CI NC[/eluser]
I've been trying using routes for the first time, I just wanted an alias for a controller, so used the example given in the user guide which claims to do that:
Quote:Code:
$route['journals'] = "blogs";
Any URL containing the word "journals" in the first segment will be remapped to the "blogs" class.
I understood this would give the routing:
journals/index --> blogs/index
journals/add --> blogs/add
etc.
But -- this doesn't seem to work. Looking at libraries/Router.php, the regex that processes wild cards has a ^ at the beginning and $ at the end, to only match URLS which match exactly.
It looks like there should be another case without the $ at the end.
At the moment, the only way I could make it work was by using backreferences in the routing array:
Code:
$route['journals/(.*)'] = "blogs/$1";
Can anyone else confirm this, or have I misunderstood the user guide?