Routes doesn't work |
Hi!
I have problem with routes in CI 3.0 RC2. I want change url from: Code: http://example.com/main/logowanie Code: http://example.com/logowanie I have code: PHP Code: $route['main/logowanie'] = 'logowanie'; Where is the problem?
What is your controller .. main oder logowanie ? If it is main, an your method is logowanie you have to route like that:
PHP Code: $route['logowanie'] = 'main/logowanie';
Thanks guys, my bad
I have one more question, how to route all methods from first controller to second? Ex. I have controller Wolontariusze with url's: Code: http://example.com/wolontariusze/[methods from Wolontariusze] Code: http://example.com/panel/[methods from Panel] And I want to do url's: Code: http://example.com/panel/wolontariusze/[methods from Wolontariusze] I create this route: PHP Code: $route['panel/wolontariusze/(:any)'] = 'wolontariusze/$1';
In CodeIgniter 3 the scope of (:any) is one segment only. Try this:
Code: $route['panel/wolontariusze/(.+)'] = 'wolontariusze/$1'; |
Welcome Guest, Not a member yet? Register Sign In |