CodeIgniter Forums
Removing sub-controller folder name from URL - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Removing sub-controller folder name from URL (/showthread.php?tid=49809)



Removing sub-controller folder name from URL - El Forum - 03-04-2012

[eluser]veledrom[/eluser]
Hi,

I have many sub-folders under main controller folder. When I call a controller, the name of the respective sub-folder appear in URL. How can I remove the name of sub-folder from URL?

Thanks

<b>Examples:</b>

Structure: applications/controllers/<b>admin</b>/my_controller.php
Appears as: http://localhost/index.php/<b>admin</b>/my_controller
Should appear as: http://localhost/index.php/my_controller

Structure: applications/controllers/<b>login</b>/my_controller.php
Appears as: http://localhost/index.php/<b>login</b>/my_controller
Should appear as: http://localhost/index.php/my_controller

Structure: applications/controllers/<b>menus</b>/my_controller.php
Appears as: http://localhost/index.php/<b>menus</b>/my_controller
Should appear as: http://localhost/index.php/my_controller