Can't redirect controller to subfolder - CodeIgniter

I am new to CodeIgniter.

I am creating an application where I have created controllers in subfolders.

Demo
 -Application
    -Controllers
      - Home
        -Left
        -Right
        -Main

      

In routes.php, I added the line below.

$route['Left/(:any)'] = 'Home/Left/$1';

      

This is the url I am trying to access.

http: // localhost / Voyager / left / main

I am getting a 404 page error.

Is there anything else I need to add or change?

Thanks for the help.

+3


source to share


1 answer


I found the answer myself.



The problem was that I had another controller in the controller folder named Home which was causing the problem. Renaming that solved the problem.

+2


source







All Articles