Uri re-routing doesn't work |
[eluser]frietkot[/eluser]
Hi, i figured that with uri routing you can use something like this: www.example.com/user/$variable_user and that works. But now I have something like this: www.example.com/$variablecity/news and I have this in the routes.php file: $route[':any/news'] = "news/city"; and that works too. But here's the thing... When I use the uri class and use $this->uri->segment(); or $this->uri->rsegment(); it returns nothing when I want to know the first segement (the city name in this case). Any suggestions?
[eluser]xwero[/eluser]
You need to add the city name to the rerouted segments. For example like this Code: $route[’(:any)/news’] = “news/city/$1”;
|
Welcome Guest, Not a member yet? Register Sign In |