Routing in Multilanguage website |
Hi,
I have found several examples of routing in web but in my case they did not work. I used this code for routing: PHP Code: $route['^(\w{2})/(.*)$'] = '$2'; PHP Code: $route['login'] = 'auth/login'; this https://www.mydomain.com/tr/auth/login url works, but https://www.mydomain.com/tr/login this one does not work. Can anyboldy help me with it? Thanks in advance
I solved it in following way:
Put this at the end of the routes.php PHP Code: $route['^(\w{2})/(.*)'] = function($language, $link) use ($route) Please share if you have better solution |
Welcome Guest, Not a member yet? Register Sign In |