How to Create a New Index Inside a Subdirectory in Codeigniter
I am using codeigniter framework in my php project and I have a requirement like this: When the url is */admin/, the application should ca...
https://www.czetsuyatech.com/2021/07/codeigniter-create-new-index-inside-subdirectory.html
I am using codeigniter framework in my php project and I have a requirement like this:
When the url is */admin/, the application should call the index.php inside the admin folder.
Folder structure:
Looking at the codeigniter's documentation on URI Routing, this can be achieve by adding this line on: application/config/routes.php
I love codeigniter!
When the url is */admin/, the application should call the index.php inside the admin folder.
Folder structure:
+codeigniter app +application +controller +index.php (the application's default) +admin (the admin's index.php should be here) +index.php +config
Looking at the codeigniter's documentation on URI Routing, this can be achieve by adding this line on: application/config/routes.php
$route['admin'] = 'admin/index';
I love codeigniter!
1 comment
thanks...
So simple and yet so effective!
Post a Comment